The German government has pushed for data retention laws to be enforced in recent years. The obligations were suspended in 2017, but if they were put in place, provisions would require all telecommunication and internet service providers to retain user metadata for up to ten weeks. That includes your IP address, when you use a mobile or landline phone, send or receive text messages, download or upload anything, send emails, and browse the web.
This does not include the actual content of internet traffic or phone conversations, however, text messages would be retained in full. Content data, as opposed to metadata, is protected by the German Bundesdatenschutzgesetz (BDSG), a federal data protection act. Germany has no laws requiring firms to implement backdoors or submit to gag orders.