{"id":17462873,"url":"https://github.com/mralias/otel-otlp-metric-example","last_synced_at":"2025-08-31T21:33:29.069Z","repository":{"id":62867223,"uuid":"560114031","full_name":"MrAlias/otel-otlp-metric-example","owner":"MrAlias","description":"Example of how to setup an OTLP exporter for metrics","archived":false,"fork":false,"pushed_at":"2025-08-31T15:15:51.000Z","size":124,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-31T17:23:53.398Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrAlias.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-31T19:08:29.000Z","updated_at":"2025-08-31T15:15:52.000Z","dependencies_parsed_at":"2023-09-24T17:21:43.470Z","dependency_job_id":"c6f24768-f879-4e56-9ff5-0bc4e013c765","html_url":"https://github.com/MrAlias/otel-otlp-metric-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MrAlias/otel-otlp-metric-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-otlp-metric-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-otlp-metric-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-otlp-metric-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-otlp-metric-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrAlias","download_url":"https://codeload.github.com/MrAlias/otel-otlp-metric-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-otlp-metric-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273045851,"owners_count":25036172,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"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":[],"created_at":"2024-10-18T09:10:19.272Z","updated_at":"2025-08-31T21:33:28.998Z","avatar_url":"https://github.com/MrAlias.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# otel-otlp-metric-example\n\nExample of how to setup an OTLP exporter for metrics\n\n## Run\n\nStart the collector using docker-compose:\n\n```terminal\ndocker-compose up -d\n```\n\nRun the client:\n\n```terminal\ngo run .\n```\n\nMake an HTTP request to the Go App:\n\n```terminal\ncurl -v localhost:8080/\n```\n\nWait 10 seconds for the periodic reader collection cycle to expire and watch the logs for data:\n\n```terminal\ndocker-compose logs -f\n```\n\nIf everything goes right, you should see the collector logging the histogram data it has received.\n\n```\n...\notel-otlp-metric-example-otel-collector-1  | 2022-10-31T19:50:40.376Z\tINFO\tloggingexporter/logging_exporter.go:56\tMetricsExporter\t{\"#metrics\": 1}\notel-otlp-metric-example-otel-collector-1  | 2022-10-31T19:50:40.376Z\tDEBUG\tloggingexporter/logging_exporter.go:66\tResourceMetrics #0\notel-otlp-metric-example-otel-collector-1  | Resource labels:\notel-otlp-metric-example-otel-collector-1  |      -\u003e env: STRING(dev)\notel-otlp-metric-example-otel-collector-1  |      -\u003e service.instance.id: STRING(xi)\notel-otlp-metric-example-otel-collector-1  |      -\u003e service.name: STRING(serviceName)\notel-otlp-metric-example-otel-collector-1  |      -\u003e telemetry.sdk.language: STRING(go)\notel-otlp-metric-example-otel-collector-1  |      -\u003e telemetry.sdk.name: STRING(opentelemetry)\notel-otlp-metric-example-otel-collector-1  |      -\u003e telemetry.sdk.version: STRING(1.11.1)\notel-otlp-metric-example-otel-collector-1  | InstrumentationLibraryMetrics #0\notel-otlp-metric-example-otel-collector-1  | InstrumentationLibrary go.opentelemetry.io/otel/example/otlp v0.1.1\notel-otlp-metric-example-otel-collector-1  | Metric #0\notel-otlp-metric-example-otel-collector-1  | Descriptor:\notel-otlp-metric-example-otel-collector-1  |      -\u003e Name: request.duration\notel-otlp-metric-example-otel-collector-1  |      -\u003e Description: Time taken to perfrom a user request\notel-otlp-metric-example-otel-collector-1  |      -\u003e Unit: ms\notel-otlp-metric-example-otel-collector-1  |      -\u003e DataType: Histogram\notel-otlp-metric-example-otel-collector-1  |      -\u003e AggregationTemporality: AGGREGATION_TEMPORALITY_CUMULATIVE\notel-otlp-metric-example-otel-collector-1  | HistogramDataPoints #0\notel-otlp-metric-example-otel-collector-1  | StartTimestamp: 2022-10-31 19:50:10.268993381 +0000 UTC\notel-otlp-metric-example-otel-collector-1  | Timestamp: 2022-10-31 19:50:40.273494074 +0000 UTC\notel-otlp-metric-example-otel-collector-1  | Count: 1\notel-otlp-metric-example-otel-collector-1  | Sum: 0.000000\notel-otlp-metric-example-otel-collector-1  | ExplicitBounds #0: 0.010000\notel-otlp-metric-example-otel-collector-1  | ExplicitBounds #1: 0.100000\notel-otlp-metric-example-otel-collector-1  | ExplicitBounds #2: 1.000000\notel-otlp-metric-example-otel-collector-1  | ExplicitBounds #3: 10.000000\notel-otlp-metric-example-otel-collector-1  | ExplicitBounds #4: 100.000000\notel-otlp-metric-example-otel-collector-1  | ExplicitBounds #5: 1000.000000\notel-otlp-metric-example-otel-collector-1  | Buckets #0, Count: 1\notel-otlp-metric-example-otel-collector-1  | Buckets #1, Count: 0\notel-otlp-metric-example-otel-collector-1  | Buckets #2, Count: 0\notel-otlp-metric-example-otel-collector-1  | Buckets #3, Count: 0\notel-otlp-metric-example-otel-collector-1  | Buckets #4, Count: 0\notel-otlp-metric-example-otel-collector-1  | Buckets #5, Count: 0\notel-otlp-metric-example-otel-collector-1  | Buckets #6, Count: 0\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmralias%2Fotel-otlp-metric-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmralias%2Fotel-otlp-metric-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmralias%2Fotel-otlp-metric-example/lists"}