Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] [exporter/azuremonitor] Incorporate SDK Version Tagging in Azure Monitor Exporter #28999

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

rajkumar-rangaraj
Copy link
Contributor

Description:

This pull request enhances the Azure Monitor Exporter by tagging telemetry data with the OpenTelemetry Collector's internal SDK version. This additional metadata will facilitate improved monitoring, troubleshooting, and analysis of data sourced from different versions of the collector.

Changes:

  • Added functionality in azuremonitorexporter to append the SDK version to each telemetry envelope.
  • Implemented getCollectorVersion to dynamically fetch the current version of the OpenTelemetry Collector.

Sample SDK Version String:

  • The SDK version string is formatted as follows: otelc-<version>-<os>-<arch>
  • Example: otelc-v0.88.1-lin-amd64

Note:

  • Since this change pertains to internal diagnostic data enrichment and does not modify any external behavior or configuration interfaces, it does not necessitate a changelog entry.

Link to tracking Issue:

Testing:

  • Adjusted existing unit tests to ensure the SDK version string is correctly included in the telemetry envelopes.
{
	"ver": 1,
	"name": "Microsoft.ApplicationInsights.RemoteDependency",
	"time": "2023-11-06T15:21:12.9807976-08:00",
	"sampleRate": 100,
	"seq": "",
	"iKey": "Ikey",
	"tags": {
		"ai.cloud.role": "otlp-test",
		"ai.cloud.roleInstance": "2c4a6d1b-f7cb-4579-8d05-65b83b4acf7e",
		*"ai.internal.sdkVersion": "otelc-v0.88.1-lin-amd64",*
		"ai.operation.id": "0e3a010cb64d919aa8f214bf0a166334",
		"ai.operation.parentId": ""
	},
	"data": {
	}
}

@rajkumar-rangaraj rajkumar-rangaraj requested review from a team and songy23 November 6, 2023 23:25
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGMT, pinging code owner @pcwiese for review.

@rajkumar-rangaraj
Copy link
Contributor Author

@songy23 Got approval from code owner. Could you please help merge this PR?

@songy23 songy23 added the ready to merge Code review completed; ready to merge by maintainers label Nov 8, 2023
@songy23
Copy link
Member

songy23 commented Nov 8, 2023

👋 Marked as ready to merge. A maintainer will help merge this PR (I don't have permission)

@rajkumar-rangaraj rajkumar-rangaraj changed the title [chore] Incorporate SDK Version Tagging in Azure Monitor Exporter [chore] [exporter/azuremonitor] Incorporate SDK Version Tagging in Azure Monitor Exporter Nov 13, 2023
@rajkumar-rangaraj
Copy link
Contributor Author

@open-telemetry/collector-contrib-approvers Could you please help merge this PR, got an approval from the code owner.

@mx-psi mx-psi merged commit 482cc7d into open-telemetry:main Nov 14, 2023
82 checks passed
@github-actions github-actions bot added this to the next release milestone Nov 14, 2023
RoryCrispin pushed a commit to ClickHouse/opentelemetry-collector-contrib that referenced this pull request Nov 24, 2023
…ure Monitor Exporter (open-telemetry#28999)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

This pull request enhances the Azure Monitor Exporter by tagging
telemetry data with the OpenTelemetry Collector's internal SDK version.
This additional metadata will facilitate improved monitoring,
troubleshooting, and analysis of data sourced from different versions of
the collector.

**Changes:**
- Added functionality in `azuremonitorexporter` to append the SDK
version to each telemetry envelope.
- Implemented `getCollectorVersion` to dynamically fetch the current
version of the OpenTelemetry Collector.

**Sample SDK Version String:**
- The SDK version string is formatted as follows:
`otelc-<version>-<os>-<arch>`
- Example: `otelc-v0.88.1-lin-amd64`

**Note:**
- Since this change pertains to internal diagnostic data enrichment and
does not modify any external behavior or configuration interfaces, it
does not necessitate a changelog entry.

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>
- Adjusted existing unit tests to ensure the SDK version string is
correctly included in the telemetry envelopes.

```json
{
	"ver": 1,
	"name": "Microsoft.ApplicationInsights.RemoteDependency",
	"time": "2023-11-06T15:21:12.9807976-08:00",
	"sampleRate": 100,
	"seq": "",
	"iKey": "Ikey",
	"tags": {
		"ai.cloud.role": "otlp-test",
		"ai.cloud.roleInstance": "2c4a6d1b-f7cb-4579-8d05-65b83b4acf7e",
		*"ai.internal.sdkVersion": "otelc-v0.88.1-lin-amd64",*
		"ai.operation.id": "0e3a010cb64d919aa8f214bf0a166334",
		"ai.operation.parentId": ""
	},
	"data": {
	}
}
```

---------

Co-authored-by: Yang Song <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/azuremonitor ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants