So in the carrots example in the read me, if I wanted to add an customDimension called “environment”, I would do the following:
tag_key = tag_key.TagKey("environment") tag_map = tag_map_module.TagMap().insert(tag_key, tag_value.TagValue(“staging”))
Then on calling the .record() method for the measure
This is what I have done and the code works I just dont see the custom dimension in app insights. Am I going about this the right way?
Hi I am trying to use opencensus-ext-azure in the following way:
import logging import logging.handlers from opencensus.ext.azure.log_exporter import AzureLogHandler log = logging.getLogger(__name__) root_logger = logging.getLogger() telemetry_handler = AzureLogHandler( connection_string='InstrumentationKey=00000-000-000-000-00000') telemetry_handler.setLevel(logging.INFO) root_logger.addHandler(telemetry_handler) def close_everything(): log.info('closing everything') try: some_error except: log.exception('some exception', exc_info=False) pass import atexit atexit.register(close_everything) atexit.register(logging.shutdown)
The issue is that python session hangs at exit(). I think line which is creating problem is
log.exception('some exception', exc_info=False). Can you please help. Thanks !
close_everythingisn't being called correct?
AzureLogHandlerregisters a flush operation upon exit of the main script, how long is the session hanging for?
try removing logging.shutdownyour suggestion worked. In the background this was happening:
Hi, I'm trying to log extra information in "customDimensions" of Application Insights Logs. I followed the example given in https://github.com/census-instrumentation/opencensus-python/tree/master/contrib/opencensus-ext-azure#custom-properties
custom_dimensions don't appear in "customDimensions" of Application Insights Logs. Am I missing something?
I would like to produce custom metric from python code
I dont find example or documentation for AZURE ( it's very easy for aws -> https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html )
Could you help me find an exemple ?
thank you !!!!
We are using FastAPI in our production and successfully implemented log exporting using Azure log handers to App Insights.
In an attempt to track incoming requests, we followed this article
Unfortunately this implementation is leading to OOM issues in our Kubernetes pods.
Is there another way to track requests and associated stats.
Any help would be greatly appreciated.
Did end up finding OpenTelemetry but unfortunately no versions of azure-monitor-opentelemetry-exporter match >1.0.0-beta.3,<2.0.0, opentelemetry-instrumentation-fastapi (>=0.19b0,<0.20) is incompatible with azure-monitor-opentelemetry-exporter (>=1.0.0-beta.3,<2.0.0)