Dhruv Popuri
06/06/2024, 5:48 AM# Set OTLP endpoint
OTLP_ENDPOINT = "<http://localhost:4317>" # Update this if your collector is on a different host
# Configure the exporter
exporter = OTLPMetricExporter(endpoint=OTLP_ENDPOINT, insecure=True)
# Define the resource with the service name
resource = Resource(attributes={SERVICE_NAME: "example-service"})
# Configure the MeterProvider with the exporter
reader = PeriodicExportingMetricReader(exporter)
provider = MeterProvider(resource=resource, metric_readers=[reader])
metrics.set_meter_provider(provider)
this is how I’ve defined the exporter. I don’t see any logs regarding this in the otel-collector container either.Nitish
06/12/2024, 11:26 AM