Skip to content

Conversation

@paulojmdias
Copy link
Member

@paulojmdias paulojmdias commented Jan 25, 2026

Description

This PR adds support for resource detection in Alibaba Cloud ECS. It uses values for cloud.platform and cloud.provider which are already in semantic conventions.

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

Link to tracking issue

Fixes #45632

Testing

Added multiple tests, including E2E tests, and I personally tested them on a ECS server.

2026-01-26T06:03:54.852+0800	debug	builders/builders.go:26	Alpha component. May change in the future.	{"resource": {"service.instance.id": "45759da4-5a87-45a1-8d7b-adc8343f2dbc", "service.name": "otelcontribcol", "service.version": "0.144.0-dev"}, "otelcol.component.id": "debug", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics"}
2026-01-26T06:03:54.853+0800	debug	builders/builders.go:26	Beta component. May change in the future.	{"resource": {"service.instance.id": "45759da4-5a87-45a1-8d7b-adc8343f2dbc", "service.name": "otelcontribcol", "service.version": "0.144.0-dev"}, "otelcol.component.id": "resourcedetection", "otelcol.component.kind": "processor", "otelcol.pipeline.id": "metrics", "otelcol.signal": "metrics"}
2026-01-26T06:03:54.854+0800	debug	builders/builders.go:26	Beta component. May change in the future.	{"resource": {"service.instance.id": "45759da4-5a87-45a1-8d7b-adc8343f2dbc", "service.name": "otelcontribcol", "service.version": "0.144.0-dev"}, "otelcol.component.id": "hostmetrics", "otelcol.component.kind": "receiver", "otelcol.signal": "metrics"}
2026-01-26T06:03:54.855+0800	info	[email protected]/service.go:239	Starting otelcontribcol...	{"resource": {"service.instance.id": "45759da4-5a87-45a1-8d7b-adc8343f2dbc", "service.name": "otelcontribcol", "service.version": "0.144.0-dev"}, "Version": "0.144.0-dev", "NumCPU": 1}
2026-01-26T06:03:54.855+0800	info	extensions/extensions.go:40	Starting extensions...	{"resource": {"service.instance.id": "45759da4-5a87-45a1-8d7b-adc8343f2dbc", "service.name": "otelcontribcol", "service.version": "0.144.0-dev"}}
2026-01-26T06:03:54.855+0800	info	internal/resourcedetection.go:153	began detecting resource information	{"resource": {"service.instance.id": "45759da4-5a87-45a1-8d7b-adc8343f2dbc", "service.name": "otelcontribcol", "service.version": "0.144.0-dev"}, "otelcol.component.id": "resourcedetection", "otelcol.component.kind": "processor", "otelcol.pipeline.id": "metrics", "otelcol.signal": "metrics"}
2026-01-26T06:03:55.091+0800	info	internal/resourcedetection.go:210	detected resource information	{"resource": {"service.instance.id": "45759da4-5a87-45a1-8d7b-adc8343f2dbc", "service.name": "otelcontribcol", "service.version": "0.144.0-dev"}, "otelcol.component.id": "resourcedetection", "otelcol.component.kind": "processor", "otelcol.pipeline.id": "metrics", "otelcol.signal": "metrics", "resource": {"cloud.account.id":"5768869373965708","cloud.availability_zone":"eu-west-1b","cloud.platform":"alibaba_cloud_ecs","cloud.provider":"alibaba_cloud","cloud.region":"eu-west-1","host.id":"i-d7oj6nt7vwbj6nq04cu2","host.image.id":"ubuntu_24_04_x64_20G_alibase_20251226.vhd","host.name":"otel-test","host.type":"ecs.t5-lc1m1.small"}}
2026-01-26T06:03:55.091+0800	info	[email protected]/service.go:262	Everything is ready. Begin running and processing data.	{"resource": {"service.instance.id": "45759da4-5a87-45a1-8d7b-adc8343f2dbc", "service.name": "otelcontribcol", "service.version": "0.144.0-dev"}}
2026-01-26T06:03:56.092+0800	info	Metrics	{"resource": {"service.instance.id": "45759da4-5a87-45a1-8d7b-adc8343f2dbc", "service.name": "otelcontribcol", "service.version": "0.144.0-dev"}, "otelcol.component.id": "debug", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "resource metrics": 1, "metrics": 1, "data points": 8}
2026-01-26T06:03:56.092+0800	info	ResourceMetrics #0
Resource SchemaURL: https://opentelemetry.io/schemas/1.9.0
Resource attributes:
     -> cloud.provider: Str(alibaba_cloud)
     -> cloud.platform: Str(alibaba_cloud_ecs)
     -> cloud.account.id: Str(5768869373965708)
     -> cloud.region: Str(eu-west-1)
     -> cloud.availability_zone: Str(eu-west-1b)
     -> host.id: Str(i-d7oj6nt7vwbj6nq04cu2)
     -> host.name: Str(otel-test)
     -> host.image.id: Str(ubuntu_24_04_x64_20G_alibase_20251226.vhd)
     -> host.type: Str(ecs.t5-lc1m1.small)

Documentation

Updated the README.md with this new detector.

@paulojmdias
Copy link
Member Author

/rerun

@paulojmdias paulojmdias marked this pull request as draft January 25, 2026 22:36
Signed-off-by: Paulo Dias <[email protected]>
@paulojmdias paulojmdias marked this pull request as ready for review January 25, 2026 22:50
Signed-off-by: Paulo Dias <[email protected]>
@paulojmdias paulojmdias marked this pull request as draft January 26, 2026 09:40
@paulojmdias paulojmdias marked this pull request as ready for review January 26, 2026 09:40
@dashpole
Copy link
Contributor

dashpole commented Jan 26, 2026

Do we have conventions for alibaba_cloud and alibaba_cloud_ecs already?

@paulojmdias
Copy link
Member Author

Do we have conventions for alibaba_cloud and alibaba_cloud_ecs already?

Yes, I'm calling the conventions on the code also.

@paulojmdias
Copy link
Member Author

/rerun

@paulojmdias paulojmdias requested a review from iblancasa January 28, 2026 18:23
@paulojmdias
Copy link
Member Author

/rerun

@paulojmdias
Copy link
Member Author

@dashpole @iblancasa Can I get your review here, please? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[processor/resourcedetection] Add support for Alibaba Cloud ECS

6 participants