{"slug": "amazon-bedrock-monitoring-and-observability-with-opentelemetry", "title": "Amazon Bedrock Monitoring and Observability with OpenTelemetry", "summary": "Amazon Bedrock users can now monitor model performance, latency, error rates, and usage trends by integrating OpenTelemetry with SigNoz. The open-source observability framework exports logs, traces, and metrics from Bedrock applications to SigNoz dashboards, enabling real-time debugging and optimization of AI workflows. This integration provides unified visibility into request/response details and system-level metrics without requiring direct model deployment management.", "body_md": "Overview\n\nThis guide walks you through setting up monitoring and observability for Amazon Bedrock using [OpenTelemetry](https://opentelemetry.io/) and exporting logs, traces, and metrics to SigNoz. With this integration, you can observe model performance, capture request/response details, and track system-level metrics in SigNoz, giving you real-time visibility into latency, error rates, and usage trends for your Bedrock applications.\n\nMany developers choose Amazon Bedrock over directly calling LLM models for its enterprise-grade features including unified API access to multiple foundation models (Claude, Llama, Titan, etc.), built-in safeguards for responsible AI, private and secure model invocations that don't leave AWS infrastructure, managed infrastructure that eliminates the need to manage model hosting, fine-tuning capabilities with your own data while maintaining privacy, and seamless integration with AWS services like S3, Lambda, and CloudWatch. These capabilities make Amazon Bedrock particularly valuable for organizations requiring production-grade reliability, compliance, and simplified model management without the complexity of direct model deployment.\n\nInstrumenting Amazon Bedrock in your LLM applications with telemetry ensures full observability across your AI workflows, making it easier to debug issues, optimize performance, and understand user interactions. By leveraging SigNoz, you can analyze correlated traces, logs, and metrics in unified dashboards, configure alerts, and gain actionable insights to continuously improve reliability, responsiveness, and user experience.\n\nPrerequisites\n\n- SigNoz setup (choose one):\n[SigNoz Cloud account](https://signoz.io/teams/)with an active ingestion key- Self-hosted SigNoz instance\n\n- Internet access to send telemetry data to SigNoz Cloud\n- An AWS account with\n[Amazon Bedrock](https://aws.amazon.com/bedrock/)working and access granted for LLM models - For Python:\n`pip`\n\ninstalled for managing Python packages and*(optional but recommended)*a Python virtual environment to isolate dependencies\n\nMonitoring Amazon Bedrock\n\nNo-code auto-instrumentation is recommended for quick setup with minimal code changes. It's ideal when you want to get observability up and running without modifying your application code and are leveraging standard instrumentor libraries.\n\n**Step 1:** Install the necessary packages in your Python environment.\n\n```\npip install \\\n  opentelemetry-distro \\\n  opentelemetry-exporter-otlp \\\n  opentelemetry-instrumentation-httpx \\\n  opentelemetry-instrumentation-system-metrics \\\n  openinference-instrumentation-bedrock \\\n  boto3\n```\n\n**Step 2:** Add Automatic Instrumentation\n\n```\nopentelemetry-bootstrap --action=install\n```\n\n**Step 3:** Configure logging level\n\nTo ensure logs are properly captured and exported, configure the root logger to emit logs at the INFO level or higher:\n\n``` python\nimport logging\nlogging.getLogger().setLevel(logging.INFO)\n```\n\nThis sets the minimum log level for the root logger to INFO, which ensures that `logger.info()`\n\ncalls and higher severity logs (WARNING, ERROR, CRITICAL) are captured by the OpenTelemetry logging auto-instrumentation and sent to SigNoz.\n\n**Step 4:** Run an example\n\n``` python\nimport boto3\nimport os\nimport logging\n\nlogging.getLogger().setLevel(logging.INFO)\nlogger = logging.getLogger(__name__)\n\nbedrock = boto3.client(\n    service_name=\"bedrock-runtime\",\n    aws_access_key_id=os.getenv(\"AWS_ACCESS\"), aws_secret_access_key=os.getenv(\"AWS_SECRET\"),\n    region_name=\"us-east-1\"  # or your region\n)\nmodel_id = \"us.anthropic.claude-sonnet-4-5-20250929-v1:0\"\n\nprompt = \"What is SigNoz?\"\nlogger.info(f\"Sending prompt to model {model_id}: {prompt}\") #sample log\nbody = {\n    \"anthropic_version\": \"bedrock-2023-05-31\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\"type\": \"text\", \"text\": prompt}\n            ]\n        }\n    ],\n    \"max_tokens\": 512,\n    \"temperature\": 0.7\n}\nresponse = bedrock.invoke_model(\n    modelId=model_id,\n    body=json.dumps(body)\n)\n\nresponse_body = json.loads(response['body'].read())\n\noutput_text = response_body['content'][0]['text']\n\nprint(\"Model output:\\n\", output_text)\n```\n\n📌 Note: No logs are automatically emitted by the BedrockInstrumentor. If you would like logs, you need to emit them manually via\n\n`logger.info()`\n\nor other logging methods.\n\n**Step 5:** Run your application with auto-instrumentation\n\n```\nOTEL_RESOURCE_ATTRIBUTES=\"service.name=<service_name>\" \\\nOTEL_EXPORTER_OTLP_ENDPOINT=\"https://ingest.<region>.signoz.cloud:443\" \\\nOTEL_EXPORTER_OTLP_HEADERS=\"signoz-ingestion-key=<your-ingestion-key>\" \\\nOTEL_EXPORTER_OTLP_PROTOCOL=grpc \\\nOTEL_TRACES_EXPORTER=otlp \\\nOTEL_METRICS_EXPORTER=otlp \\\nOTEL_LOGS_EXPORTER=otlp \\\nOTEL_PYTHON_LOG_CORRELATION=true \\\nOTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true \\\nopentelemetry-instrument <your_run_command>\n```\n\nis the name of your service`<service_name>`\n\n`<region>`\n\n: Your[SigNoz Cloud region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint)`<your-ingestion-key>`\n\n: Your SigNoz[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/)- Replace\n`<your_run_command>`\n\nwith the actual command you would use to run your application. For example:`python main.py`\n\nUsing self-hosted SigNoz? Most steps are identical. To adapt this guide, update the endpoint and remove the ingestion key header as shown in [Cloud → Self-Hosted](https://signoz.io/docs/ingestion/cloud-vs-self-hosted/#cloud-to-self-hosted).\n\nCode-based instrumentation gives you fine-grained control over your telemetry configuration. Use this approach when you need to customize resource attributes, sampling strategies, or integrate with existing observability infrastructure.\n\n**Step 1:** Install the necessary packages in your Python environment.\n\n```\npip install \\\n  opentelemetry-api \\\n  opentelemetry-sdk \\\n  opentelemetry-exporter-otlp \\\n  opentelemetry-instrumentation-httpx \\\n  opentelemetry-instrumentation-system-metrics \\\n  openinference-instrumentation-bedrock \\\n  boto3\n```\n\n**Step 2:** Import the necessary modules in your Python application\n\n**Traces:**\n\n``` python\nfrom openinference.instrumentation.bedrock import BedrockInstrumentor\nfrom opentelemetry import trace\nfrom opentelemetry.sdk.resources import Resource\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import BatchSpanProcessor\nfrom opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter\n```\n\n**Logs:**\n\n``` python\nfrom opentelemetry.sdk._logs import LoggerProvider, LoggingHandler\nfrom opentelemetry.sdk._logs.export import BatchLogRecordProcessor\nfrom opentelemetry.exporter.otlp.proto.http._log_exporter import OTLPLogExporter\nfrom opentelemetry._logs import set_logger_provider\nimport logging\n```\n\n**Metrics:**\n\n``` python\nfrom opentelemetry.sdk.metrics import MeterProvider\nfrom opentelemetry.exporter.otlp.proto.http.metric_exporter import OTLPMetricExporter\nfrom opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader\nfrom opentelemetry import metrics\nfrom opentelemetry.instrumentation.system_metrics import SystemMetricsInstrumentor\nfrom opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor\n```\n\n**Step 3:** Set up the OpenTelemetry Tracer Provider to send traces directly to SigNoz Cloud\n\n``` python\nfrom opentelemetry.sdk.resources import Resource\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import BatchSpanProcessor\nfrom opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter\nfrom opentelemetry import trace\nimport os\n\nresource = Resource.create({\"service.name\": \"<service_name>\"})\nprovider = TracerProvider(resource=resource)\nspan_exporter = OTLPSpanExporter(\n    endpoint= os.getenv(\"OTEL_EXPORTER_TRACES_ENDPOINT\"),\n    headers={\"signoz-ingestion-key\": os.getenv(\"SIGNOZ_INGESTION_KEY\")},\n)\nprocessor = BatchSpanProcessor(span_exporter)\nprovider.add_span_processor(processor)\ntrace.set_tracer_provider(provider)\n```\n\nis the name of your service`<service_name>`\n\n→ SigNoz Cloud trace endpoint with appropriate`OTEL_EXPORTER_TRACES_ENDPOINT`\n\n[region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint):`https://ingest.<region>.signoz.cloud:443/v1/traces`\n\n→ Your SigNoz`SIGNOZ_INGESTION_KEY`\n\n[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/)\n\nUsing self-hosted SigNoz? Most steps are identical. To adapt this guide, update the endpoint and remove the ingestion key header as shown in [Cloud → Self-Hosted](https://signoz.io/docs/ingestion/cloud-vs-self-hosted/#cloud-to-self-hosted).\n\n**Step 4:** Instrument Bedrock using `BedrockInstrumentor`\n\nand the configured Tracer Provider\n\n``` python\nfrom openinference.instrumentation.bedrock import BedrockInstrumentor\n\nBedrockInstrumentor().instrument()\n```\n\n📌 Important: Place this code at the start of your application logic — before any Bedrock functions are called or used — to ensure telemetry is correctly captured.\n\n**Step 5**: Setup Logs\n\n``` python\nimport logging\nfrom opentelemetry.sdk.resources import Resource\nfrom opentelemetry._logs import set_logger_provider\nfrom opentelemetry.sdk._logs import LoggerProvider, LoggingHandler\nfrom opentelemetry.sdk._logs.export import BatchLogRecordProcessor\nfrom opentelemetry.exporter.otlp.proto.http._log_exporter import OTLPLogExporter\nimport os\n\nresource = Resource.create({\"service.name\": \"<service_name>\"})\nlogger_provider = LoggerProvider(resource=resource)\nset_logger_provider(logger_provider)\n\notlp_log_exporter = OTLPLogExporter(\n    endpoint= os.getenv(\"OTEL_EXPORTER_LOGS_ENDPOINT\"),\n    headers={\"signoz-ingestion-key\": os.getenv(\"SIGNOZ_INGESTION_KEY\")},\n)\nlogger_provider.add_log_record_processor(\n    BatchLogRecordProcessor(otlp_log_exporter)\n)\n# Attach OTel logging handler to root logger\nhandler = LoggingHandler(level=logging.INFO, logger_provider=logger_provider)\nlogging.basicConfig(level=logging.INFO, handlers=[handler])\n\nlogger = logging.getLogger(__name__)\n```\n\nis the name of your service`<service_name>`\n\n→ SigNoz Cloud endpoint with appropriate`OTEL_EXPORTER_LOGS_ENDPOINT`\n\n[region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint):`https://ingest.<region>.signoz.cloud:443/v1/logs`\n\n→ Your SigNoz`SIGNOZ_INGESTION_KEY`\n\n[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/)\n\n📌 Note: No logs are automatically emitted by the BedrockInstrumentor. If you would like logs, you need to emit them manually via\n\n`logger.info()`\n\nor other logging methods.\n\nUsing self-hosted SigNoz? Most steps are identical. To adapt this guide, update the endpoint and remove the ingestion key header as shown in [Cloud → Self-Hosted](https://signoz.io/docs/ingestion/cloud-vs-self-hosted/#cloud-to-self-hosted).\n\n**Step 6**: Setup Metrics\n\n``` python\nfrom opentelemetry.sdk.resources import Resource\nfrom opentelemetry.sdk.metrics import MeterProvider\nfrom opentelemetry.exporter.otlp.proto.http.metric_exporter import OTLPMetricExporter\nfrom opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader\nfrom opentelemetry import metrics\nfrom opentelemetry.instrumentation.system_metrics import SystemMetricsInstrumentor\nimport os\n\nresource = Resource.create({\"service.name\": \"<service-name>\"})\nmetric_exporter = OTLPMetricExporter(\n    endpoint= os.getenv(\"OTEL_EXPORTER_METRICS_ENDPOINT\"),\n    headers={\"signoz-ingestion-key\": os.getenv(\"SIGNOZ_INGESTION_KEY\")},\n)\nreader = PeriodicExportingMetricReader(metric_exporter)\nmetric_provider = MeterProvider(metric_readers=[reader], resource=resource)\nmetrics.set_meter_provider(metric_provider)\n\nmeter = metrics.get_meter(__name__)\n\n# turn on out-of-the-box metrics\nSystemMetricsInstrumentor().instrument()\nHTTPXClientInstrumentor().instrument()\n```\n\nis the name of your service`<service_name>`\n\n→ SigNoz Cloud endpoint with appropriate`OTEL_EXPORTER_METRICS_ENDPOINT`\n\n[region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint):`https://ingest.<region>.signoz.cloud:443/v1/metrics`\n\n→ Your SigNoz`SIGNOZ_INGESTION_KEY`\n\n[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/)\n\n📌 Note: SystemMetricsInstrumentor provides system metrics (CPU, memory, etc.), and HTTPXClientInstrumentor provides outbound HTTP request metrics such as request duration. These are not Bedrock-specific metrics. Bedrock does not expose metrics as part of their SDK. If you want to add custom metrics to your Bedrock application, see\n\n[Python Custom Metrics].\n\nUsing self-hosted SigNoz? Most steps are identical. To adapt this guide, update the endpoint and remove the ingestion key header as shown in [Cloud → Self-Hosted](https://signoz.io/docs/ingestion/cloud-vs-self-hosted/#cloud-to-self-hosted).\n\n**Step 7:** Run an example\n\n``` python\nimport boto3\nimport os\n\nbedrock = boto3.client(\n    service_name=\"bedrock-runtime\",\n    aws_access_key_id=os.getenv(\"AWS_ACCESS\"), aws_secret_access_key=os.getenv(\"AWS_SECRET\"),\n    region_name=\"us-east-1\"  # or your region\n)\nmodel_id = \"us.anthropic.claude-sonnet-4-5-20250929-v1:0\"\n\nprompt = \"What is SigNoz?\"\nlogger.info(f\"Sending prompt to model {model_id}: {prompt}\") #sample log\nbody = {\n    \"anthropic_version\": \"bedrock-2023-05-31\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\"type\": \"text\", \"text\": prompt}\n            ]\n        }\n    ],\n    \"max_tokens\": 512,\n    \"temperature\": 0.7\n}\nresponse = bedrock.invoke_model(\n    modelId=model_id,\n    body=json.dumps(body)\n)\n\nresponse_body = json.loads(response['body'].read())\n\noutput_text = response_body['content'][0]['text']\n\nprint(\"Model output:\\n\", output_text)\n```\n\n📌 Note: Before running this code, ensure that you have set the environment variables\n\n`AWS_ACCESS`\n\nand`AWS_SECRET`\n\nwith your AWS credentials.\n\nView Traces, Logs, and Metrics in SigNoz\n\nYour Bedrock commands should now automatically emit traces, logs, and metrics.\n\nYou should be able to view traces in Signoz Cloud under the traces tab:\n\nWhen you click on a trace in SigNoz, you'll see a detailed view of the trace, including all associated spans, along with their events and attributes.\n\nYou should be able to view logs in Signoz Cloud under the logs tab. You can also view correlated logs by clicking on the “Related Logs” button in the trace view to see correlated logs:\n\nWhen you click on any of these logs in SigNoz, you'll see a detailed view of the log, including attributes:\n\nYou should be able to see Bedrock related metrics in Signoz Cloud under the metrics tab:\n\nWhen you click on any of these metrics in SigNoz, you'll see a detailed view of the metric, including attributes:\n\nDashboard\n\nYou can also check out our custom Amazon Bedrock dashboard [here](https://signoz.io/docs/dashboards/dashboard-templates/amazon-bedrock-dashboard/) which provides specialized visualizations for monitoring your Bedrock usage in applications. The dashboard includes pre-built charts specifically tailored for LLM usage, along with import instructions to get started quickly.", "url": "https://wpnews.pro/news/amazon-bedrock-monitoring-and-observability-with-opentelemetry", "canonical_source": "https://signoz.io/docs/amazon-bedrock-monitoring", "published_at": "2026-06-11 00:00:00+00:00", "updated_at": "2026-06-12 09:59:34.196112+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "large-language-models", "generative-ai", "mlops"], "entities": ["Amazon Bedrock", "OpenTelemetry", "SigNoz", "AWS", "Claude", "Llama", "Titan", "Lambda"], "alternates": {"html": "https://wpnews.pro/news/amazon-bedrock-monitoring-and-observability-with-opentelemetry", "markdown": "https://wpnews.pro/news/amazon-bedrock-monitoring-and-observability-with-opentelemetry.md", "text": "https://wpnews.pro/news/amazon-bedrock-monitoring-and-observability-with-opentelemetry.txt", "jsonld": "https://wpnews.pro/news/amazon-bedrock-monitoring-and-observability-with-opentelemetry.jsonld"}}