@Shahnawaz, Users can setup proxypolicy
via azure-core apis. configure_azure_monitor
api passes the policies to azure monitor client via kwargs
. An example of this can be shown below:
from azure.monitor.opentelemetry import configure_azure_monitor
from opentelemetry import trace
from azure.core.pipeline import policies
configure_azure_monitor(
proxy_policy=policies.ProxyPolicy(
proxies={"http": "http://10.10.1.10:1234"}
)
)
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("hello"):
print("Hello, World!")
input()
For more details, see the documentation for ProxyPolicy Class of the azure.core.pipeline
package.
Hope this helps.
If the answer did not help, please add more context/follow-up question for it. Else, if the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.