OpenTelemetry collector with HTTP proxy forwarding enabled

When you enable HTTP proxy forwarding, you create a single point through which multiple machines send requests to an external server. If you are behind a corporate proxy or firewall, Apigee may not be able to send metrics to Cloud Monitoring with its default settings. You can set and modify settings directly in the OpenTelemetry collector to have its requests pass through the proxy server.

This topic describes how to configure the OpenTelemetry collector settings using one of the three available environment variables:

  • NO_PROXY: Accepts a list of hostnames or IP addresses whose traffic should not flow through the HTTP proxy.
  • HTTP_PROXY: Accepts the URL of the proxy whose server is used for HTTP connections.
  • HTTPS_PROXY: Accepts the URL of the proxy whose server is used for HTTPS connections.

Configure OpenTelemetry collector settings

You can configure the OpenTelemetry collector settings to work with HTTP proxy forwarding by using themetrics.collector.envVars property inoverrides.yaml. Themetrics.collector.envVars property allows you to pass in the environment variables supported by OpenTelemetry. See Proxy supportin the OpenTelemetry documentation for more details.

You can use the following values for themetrics.collector.envVars property:

  • For anhttp proxy:
    metrics:...collector:  envVars:    HTTP_PROXY: '<proxy-address>'

    for example:

      envVars:    HTTP_PROXY: 'http://1.1.1.1:80'
  • For anhttps proxy:
    metrics:...collector:  envVars:    HTTPS_PROXY: '<proxy-address>'

    for example:

      envVars:    HTTPS_PROXY: 'https://1.1.1.1:80'
  • For addresses that must not use the proxy:
    metrics:...collector:  envVars:    NO_PROXY: '<comma-separated-values>'

    for example:

      envVars:    NO_PROXY: 'http://1.1.1.1:80, http://1.1.1.1:81'

Apply the changes

Use the following command to apply the changes with theapigee-telemetry chart:

helm upgrade telemetry apigee-telemetry/ \  --namespaceAPIGEE_NAMESPACE \  --atomic \  -fOVERRIDES_FILE
Note: If you see an error sayingError: UPGRADE FAILED: "telemetry" has no deployed releases,replaceupgrade withinstall and try the command again.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.