{"id":14972010,"url":"https://github.com/coronabytes/observability","last_synced_at":"2026-02-15T10:35:50.298Z","repository":{"id":249185102,"uuid":"830704099","full_name":"coronabytes/observability","owner":"coronabytes","description":"Easy ASP.NET Core OpenTelemetry Setup","archived":false,"fork":false,"pushed_at":"2025-03-04T18:51:20.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T22:51:05.936Z","etag":null,"topics":["csharp","grafana","opentelemetry"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coronabytes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-18T20:09:57.000Z","updated_at":"2025-03-04T18:51:08.000Z","dependencies_parsed_at":"2024-07-20T13:26:05.706Z","dependency_job_id":"ae29a2fe-bcf3-41a5-ae31-a87b4d444da6","html_url":"https://github.com/coronabytes/observability","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.4285714285714286,"last_synced_commit":"54ed443cd7ad7cc7ba6be0120ee88a3105f443f9"},"previous_names":["coronabytes/observability"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/coronabytes/observability","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coronabytes%2Fobservability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coronabytes%2Fobservability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coronabytes%2Fobservability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coronabytes%2Fobservability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coronabytes","download_url":"https://codeload.github.com/coronabytes/observability/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coronabytes%2Fobservability/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502992,"owners_count":23618674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","grafana","opentelemetry"],"created_at":"2024-09-24T13:46:11.588Z","updated_at":"2026-02-15T10:35:45.249Z","avatar_url":"https://github.com/coronabytes.png","language":"C#","readme":"[![Nuget](https://img.shields.io/nuget/v/Core.Observability)](https://www.nuget.org/packages/Core.Observability)\n[![Nuget](https://img.shields.io/nuget/dt/Core.Observability)](https://www.nuget.org/packages/Core.Observability)\n\n```\ndotnet add package Core.Observability\n```\n# 3-Line OpenTelemetry ASP.NET Core Integration\n- trace id in response header\n- sends logs, metrics and traces to opentelemetry collector\n- enrichment/augmentation of logs and traces even when exceptions occurr\n- inject trace id to http requests\n- health checks\n- best practices from aspire\n  - servicediscovery\n  - http resilience handler\n\n## Initialization in ASP.NET Core\n\n```csharp\nbuilder.AddObservability();\n\nbuilder.Services.Configure\u003cObservabilityOptions\u003e(options =\u003e\n{\n    options.TraceIdHeader = \"x-trace-id\";\n    options.Augment = (context, tags) =\u003e\n    {\n        tags.Add(\"TenantId\", \"extrakt from http context\");\n        return ValueTask.CompletedTask;\n    };\n});\n```\n\n```csharp\n// optional\napp.MapObservabilityHealthChecks();\n\napp.UseAuthorization();\n\n// required\napp.UseObservability();\n\napp.MapControllers();\napp.Run();\n```\n\n## More Instrumentation\n\n```csharp\nbuilder.AddObservability(configureTracing: tracer =\u003e\n{\n    tracer.AddEntityFrameworkCoreInstrumentation();\n    tracer.AddRedisInstrumentation();\n});\n```\n\n## Environment Variables\n\n```\n\"OTEL_SERVICE_NAME\": \"my-project\",\n\"OTEL_RESOURCE_ATTRIBUTES\": \"service.namespace=core,environment.name=dev\",\n\n\"OTEL_EXPORTER_OTLP_ENDPOINT\": \"http://localhost:4317\",\nor\n\"OTEL_EXPORTER_OTLP_ENDPOINT\": \"http://collector:4317\",\n\n\"OTEL_EXPORTER_OTLP_PROTOCOL\": \"grpc\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoronabytes%2Fobservability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoronabytes%2Fobservability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoronabytes%2Fobservability/lists"}