{"id":18435405,"url":"https://github.com/mnie/appinsights.enricher","last_synced_at":"2026-02-27T02:02:31.115Z","repository":{"id":38034906,"uuid":"186710394","full_name":"MNie/AppInsights.Enricher","owner":"MNie","description":"Enrich your telemetry data!","archived":false,"fork":false,"pushed_at":"2022-06-22T22:22:41.000Z","size":42,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-31T13:26:51.715Z","etag":null,"topics":["appinsights","azure","csharp","telemetry"],"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/MNie.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}},"created_at":"2019-05-14T22:37:31.000Z","updated_at":"2022-06-22T22:22:33.000Z","dependencies_parsed_at":"2022-09-04T07:01:52.613Z","dependency_job_id":null,"html_url":"https://github.com/MNie/AppInsights.Enricher","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MNie/AppInsights.Enricher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNie%2FAppInsights.Enricher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNie%2FAppInsights.Enricher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNie%2FAppInsights.Enricher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNie%2FAppInsights.Enricher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MNie","download_url":"https://codeload.github.com/MNie/AppInsights.Enricher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNie%2FAppInsights.Enricher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29882627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["appinsights","azure","csharp","telemetry"],"created_at":"2024-11-06T06:08:07.939Z","updated_at":"2026-02-27T02:02:26.100Z","avatar_url":"https://github.com/MNie.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AppInsights.Enricher [![NuGet](https://buildstats.info/nuget/AppInsights.Enricher?includePreReleases=true)](https://www.nuget.org/packages/AppInsights.Enricher)\n\n\nCould be downloaded from NuGet:\n- ```Install-Package AppInsights.Enricher```\n- ```dotnet add package AppInsights.Enricher```\n- ```paket add AppInsights.Enricher```\n\nHow to use it:\n\n* implement own ITelemetryEnricher\nYou say here when you want to store Request/Response:\n\n```csharp\npublic class CustomTelemetryEnricher : ITelemetryEnricher\n{\n    public ITelemetry Enrich(ITelemetry tele) =\u003e tele;\n    public bool AttachRequest(HttpContext context) =\u003e true;\n    public bool AttachResponse(HttpContext context) =\u003e context?.Request?.Path.Value?.Contains(\"mail\") == true;\n}\n```\n\n* implement own IProcessorApplier\nYou say here when you want to log data to AppInsights\n\n```csharp\npublic class CustomProcessorApplier: IProcessorApplier\n{\n    public bool Apply(ITelemetry tele)\n    {\n        if (tele is RequestTelemetry request)\n        {\n            var isItBadRequestOrConnection = request.ResponseCode == \"404\";\n            if (isItBadRequestOrConnection)\n                return false;\n        }\n\n        if (!(tele is DependencyTelemetry dependency)) return true;\n\n        return true;\n    }\n}\n```\n\n* Register it in container\n\n```csharp\nservices.AddApplicationInsightsKubernetesEnricher();\nservices.AddSingleton\u003cIProcessorApplier, CustomProcessorApplier\u003e();\nservices.AddSingleton\u003cITelemetryEnricher, CustomTelemetryEnricher\u003e();\nservices.AddSingleton\u003cIRequestDataAccessor\u003e(new RequestDataAccessor(1_000, 1_000, 100_000));\nreturn services.AddTelemetry\u003cTelemetryProcessor\u003e(new ApplicationInsightsServiceOptions { InstrumentationKey = \"your_key\" });\n```\n\nAnd that's all!\n\nIf you want to read more about using this lib, you could take a look [at my blog post about it](https://www.mnie.me/appinsightslogging).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnie%2Fappinsights.enricher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmnie%2Fappinsights.enricher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnie%2Fappinsights.enricher/lists"}