Dynatrace uses OpenTelemetry to monitor Google Cloud Functions invocations.
For that purpose, Dynatrace provides language-specific packages—such as @dynatrace/opentelemetry-gcf
for Node.js, dynatrace-opentelemetry-gcf
for Python, and Dynatrace.OpenTelemetry.Instrumentation.GoogleCloudFunctions
for .NET—that can be used in combination with default OpenTelemetry SDKs and APIs.
Select a configuration method
Specify a Dynatrace API endpoint
Apply the configuration to your Google Cloud function
Instrument the function code
If you don't want to use the default public Dynatrace endpoint, specify a custom Dynatrace API endpoint where you want to receive monitoring data.
To reduce network latency, you typically deploy a Dynatrace ActiveGate close to (in the same region as) the Google Cloud function that you want to monitor.
Copy the JSON snippet into a file named dtconfig.json
located in the root folder of your Google Cloud Functions deployment.
On Enable Monitoring for Google Cloud Functions, under Use the following values to configure your monitored Google Cloud Functions, there's a snippet with all required environment variables. Be sure to add these environment variables and their values to your Google Cloud function configuration. For details, see Using environment variables.
Adding the required API calls to monitor function invocations via OpenTelemetry is specific to languages and their respective OpenTelemetry distribution:
The Dynatrace Google Cloud Functions integration doesn't capture the IP addresses of outgoing HTTP requests. If the called service isn't monitored with Dynatrace OneAgent, this results in unmonitored hosts.