Quando attivi l'inoltro del proxy HTTP, crei un unico punto tramite il quale più macchine inviano richieste a un server esterno. Se ti trovi dietro un proxy o un firewall aziendale, Apigee
potrebbe non essere in grado di inviare le metriche a Cloud Monitoring con le impostazioni predefinite. Puoi impostare e
modificare le impostazioni direttamente nel collector OpenTelemetry per fare in modo che le sue richieste passino attraverso il server proxy.
Questo argomento descrive come configurare le impostazioni del collector OpenTelemetry utilizzando una delle tre variabili di ambiente disponibili:
NO_PROXY: accetta un elenco di nomi host o indirizzi IP il cui traffico non deve passare attraverso il proxy HTTP.
HTTP_PROXY: accetta l'URL del proxy il cui server viene utilizzato per le connessioni HTTP.
HTTPS_PROXY: accetta l'URL del proxy il cui server viene utilizzato per le connessioni HTTPS.
Configura le impostazioni del collector OpenTelemetry
Puoi configurare le impostazioni del collector OpenTelemetry in modo che funzionino con l'inoltro del proxy HTTP utilizzando la proprietà metrics.collector.envVars in overrides.yaml. La proprietà metrics.collector.envVars
ti consente di passare le variabili di ambiente supportate da OpenTelemetry. Per ulteriori dettagli, consulta la sezione
Supporto dei proxy nella documentazione di OpenTelemetry.
Puoi utilizzare i seguenti valori per la proprietà metrics.collector.envVars:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eEnabling HTTP proxy forwarding creates a central point for multiple machines to send requests to external servers, which can impact Apigee's ability to send metrics to Cloud Monitoring when behind a corporate proxy or firewall.\u003c/p\u003e\n"],["\u003cp\u003eYou can configure the OpenTelemetry collector to route requests through a proxy server using the \u003ccode\u003emetrics.collector.envVars\u003c/code\u003e property in \u003ccode\u003eoverrides.yaml\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eHTTP_PROXY\u003c/code\u003e and \u003ccode\u003eHTTPS_PROXY\u003c/code\u003e environment variables define the URL of the proxy server for HTTP and HTTPS connections, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eNO_PROXY\u003c/code\u003e variable allows you to specify a list of hostnames or IP addresses that should bypass the HTTP proxy.\u003c/p\u003e\n"],["\u003cp\u003eApplying the configuration changes requires using the helm command with either an \u003ccode\u003eupgrade\u003c/code\u003e or \u003ccode\u003einstall\u003c/code\u003e of the apigee-telemetry chart.\u003c/p\u003e\n"]]],[],null,["# OpenTelemetry collector with HTTP proxy forwarding enabled\n\n| You are currently viewing version 1.14 of the Apigee hybrid documentation. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nWhen you enable HTTP proxy forwarding, you create a single point through which multiple machines\nsend requests to an external server. If you are behind a corporate proxy or firewall, Apigee\nmay not be able to send metrics to Cloud Monitoring with its default settings. You can set and\nmodify settings directly in the OpenTelemetry collector to have its requests pass through the proxy server.\n\nThis topic describes how to configure the OpenTelemetry collector settings using one of the three available\nenvironment variables:\n\n- `NO_PROXY`: Accepts a list of hostnames or IP addresses whose traffic should not flow through the HTTP proxy.\n- `HTTP_PROXY`: Accepts the URL of the proxy whose server is used for HTTP connections.\n- `HTTPS_PROXY`: Accepts the URL of the proxy whose server is used for HTTPS connections.\n\n\u003cbr /\u003e\n\nConfigure OpenTelemetry collector settings\n------------------------------------------\n\nYou can configure the OpenTelemetry collector settings to work with HTTP proxy forwarding by using the\n`metrics.collector.envVars` property in `overrides.yaml`. The `metrics.collector.envVars` property\nallows you to pass in the environment variables supported by OpenTelemetry. See [Proxy support](https://opentelemetry.io/docs/collector/configuration/#proxy-support)in the OpenTelemetry documentation for more details.\n\nYou can use the following values for the `metrics.collector.envVars` property:\n\n- For an `http` proxy: \n\n ```\n metrics:\n ...\n collector:\n envVars:\n HTTP_PROXY: '\u003cproxy-address\u003e'\n ```\n\n for example: \n\n ```\n envVars:\n HTTP_PROXY: 'http://1.1.1.1:80'\n ```\n- For an `https` proxy: \n\n ```\n metrics:\n ...\n collector:\n envVars:\n HTTPS_PROXY: '\u003cproxy-address\u003e'\n ```\n\n for example: \n\n ```\n envVars:\n HTTPS_PROXY: 'https://1.1.1.1:80'\n ```\n- For addresses that must not use the proxy: \n\n ```\n metrics:\n ...\n collector:\n envVars:\n NO_PROXY: '\u003ccomma-separated-values\u003e'\n ```\n\n for example: \n\n ```\n envVars:\n NO_PROXY: 'http://1.1.1.1:80, http://1.1.1.1:81'\n ```\n\nApply the changes\n-----------------\n\nUse the following command to apply the changes with the `apigee-telemetry` chart: \n\n```\nhelm upgrade telemetry apigee-telemetry/ \\\n --namespace APIGEE_NAMESPACE \\\n --atomic \\\n -f OVERRIDES_FILE\n```\n| **Note:** If you see an error saying `Error: UPGRADE FAILED: \"telemetry\" has no deployed releases`, replace `upgrade` with `install` and try the command again.\n\nWhat's next\n-----------\n\n- See [`metrics.collector.envVars`](/apigee/docs/hybrid/v1.14/config-prop-ref#logger-envVars) in the Configuration properties reference.\n- Learn how to [Configure forward proxying for API proxies](/apigee/docs/hybrid/v1.14/forward-proxy)."]]