Skip to content

[processor/resourcedetection] Add support for DigitalOcean#42804

Merged
songy23 merged 5 commits into
open-telemetry:mainfrom
paulojmdias:feat/digitalocean
Sep 24, 2025
Merged

[processor/resourcedetection] Add support for DigitalOcean#42804
songy23 merged 5 commits into
open-telemetry:mainfrom
paulojmdias:feat/digitalocean

Conversation

@paulojmdias
Copy link
Copy Markdown
Member

@paulojmdias paulojmdias commented Sep 21, 2025

Description

This PR adds support for resource detection in DigitalOcean.

I'm proposing to be a code owner for this detector 🙌

Semantic Conventions PR: open-telemetry/semantic-conventions#2790

Link to tracking issue

Fixes #42803

Testing

Tests added and also tested on a DigitalOcean instance, as we can see the output below.

2025-09-21T22:29:33.140Z	info	service@v0.135.1-0.20250918163459-ba0b327d5fe9/service.go:239	Starting otelcontribcol...	{"resource": {"service.instance.id": "e21da881-08da-47bf-b07a-ac501803050d", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "Version": "0.135.0-dev", "NumCPU": 1}
2025-09-21T22:29:33.140Z	info	extensions/extensions.go:41	Starting extensions...	{"resource": {"service.instance.id": "e21da881-08da-47bf-b07a-ac501803050d", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}}
2025-09-21T22:29:33.141Z	info	internal/resourcedetection.go:137	began detecting resource information	{"resource": {"service.instance.id": "e21da881-08da-47bf-b07a-ac501803050d", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "resourcedetection", "otelcol.component.kind": "processor", "otelcol.pipeline.id": "metrics", "otelcol.signal": "metrics"}
2025-09-21T22:29:33.178Z	info	internal/resourcedetection.go:188	detected resource information	{"resource": {"service.instance.id": "e21da881-08da-47bf-b07a-ac501803050d", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "resourcedetection", "otelcol.component.kind": "processor", "otelcol.pipeline.id": "metrics", "otelcol.signal": "metrics", "resource": {"cloud.provider":"digitalocean","cloud.region":"fra1","host.id":"520038265","host.name":"ubuntu-s-1vcpu-1gb-fra1-01"}}
2025-09-21T22:29:33.178Z	info	service@v0.135.1-0.20250918163459-ba0b327d5fe9/service.go:262	Everything is ready. Begin running and processing data.	{"resource": {"service.instance.id": "e21da881-08da-47bf-b07a-ac501803050d", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}}
2025-09-21T22:29:34.181Z	info	Metrics	{"resource": {"service.instance.id": "e21da881-08da-47bf-b07a-ac501803050d", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "debug", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "resource metrics": 3, "metrics": 5, "data points": 17}
2025-09-21T22:29:34.182Z	info	ResourceMetrics #0
Resource SchemaURL: https://opentelemetry.io/schemas/1.9.0
Resource attributes:
     -> cloud.provider: Str(digitalocean)
     -> host.id: Str(520038265)
     -> host.name: Str(ubuntu-s-1vcpu-1gb-fra1-01)
     -> cloud.region: Str(fra1)

Documentation

Updated the README.md with this new detector.

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
The list of the populated resource attributes can be found at [Scaleway Detector Resource Attributes](./internal/akamai/documentation.md).

Akamai custom configuration example:
Scaleway custom configuration example:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change intended for this PR or should it land on its own?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will move to a dedicated one 🙏

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
@songy23 songy23 merged commit 12225b5 into open-telemetry:main Sep 24, 2025
186 checks passed
@github-actions github-actions Bot added this to the next release milestone Sep 24, 2025
@paulojmdias paulojmdias deleted the feat/digitalocean branch September 24, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connector/datadog exporter/datadog Datadog components processor/resourcedetection Resource detection processor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[processor/resourcedetection] Add support for Digitalocean

5 participants