Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Initializing with the "proxy" option passed in doesn't appear to work when initializaing AzureLogHandler and AzureExporter #896

@skinamdar

Description

@skinamdar

See partial sample invocation below where the proxy is passed in.

from opencensus.ext.azure.log_exporter import AzureLogHandler
from opencensus.ext.azure.trace_exporter import AzureExporter
non_azure_https_proxy = {"https": "https://www.google.com"} # to test that the command fails
app_insights_connection_string = "insert_here"
azure_logger = AzureLogHandler(connection_string=app_insights_connection_string, proxy=azure_https_proxy)
azure_exporter = AzureExporter(connection_string=app_insights_connection_string, proxy=azure_https_proxy)

Running a similar command over curl

curl -d '{"name": "MetricData", "time":"2020-05-29T00:18:28.9586379Z","iKey":"{insert_i_key_here}","data":{"baseType":"MetricData","baseData":{"metrics":[{"name":"Custom metric","value":2,"count":1}]}}}' https://dc.services.visualstudio.com/v2/track -x https://www.google.com -v

results in a curl address error (which we expect as we want to make sure the requests passed via opencensus are routed to a proxy which we've defined)

Can you please update the code to make sure it works with a custom proxy passed in?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions