Skip to content

feat(telemetry): export ExtraConfig and CosmosExtra types#26006

Merged
technicallyty merged 6 commits intomainfrom
gjermund/export-telemetry-types
Mar 3, 2026
Merged

feat(telemetry): export ExtraConfig and CosmosExtra types#26006
technicallyty merged 6 commits intomainfrom
gjermund/export-telemetry-types

Conversation

@gjermundgaraba
Copy link
Contributor

  • Export extraConfigExtraConfig and cosmosExtraCosmosExtra so external consumers can programmatically construct the cosmos_extra section of otel.yaml without maintaining manual YAML templates
  • Adds godoc comment to ExtraConfig explaining intended usage alongside otelconf.OpenTelemetryConfiguration

@github-actions

This comment has been minimized.

@aaronc
Copy link
Member

aaronc commented Feb 25, 2026

These types should be considered highly unstable, thus the reason they're not exported. But I guess with v0.x versioning that doesn't matter. Ideally, otelconf supports all this stuff natively eventually

@gjermundgaraba
Copy link
Contributor Author

These types should be considered highly unstable, thus the reason they're not exported. But I guess with v0.x versioning that doesn't matter. Ideally, otelconf supports all this stuff natively eventually

True, but these types are practically exposed to the user anyway, so it makes sense to make the available for automation. I would rather have compilation errors than having to manually keep this in sync.

@aaronc
Copy link
Member

aaronc commented Feb 25, 2026

Fair enough. We might want to give the types slightly better names

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.78%. Comparing base (2c139bd) to head (5f4cf2c).

Files with missing lines Patch % Lines
telemetry/config.go 0.00% 14 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #26006      +/-   ##
==========================================
- Coverage   59.80%   59.78%   -0.02%     
==========================================
  Files         965      965              
  Lines       64229    64227       -2     
==========================================
- Hits        38410    38397      -13     
- Misses      25819    25830      +11     
Files with missing lines Coverage Δ
telemetry/config.go 2.38% <0.00%> (+0.05%) ⬆️

... and 2 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

gjermundgaraba and others added 3 commits February 27, 2026 08:17
Export the otel.yaml Cosmos extension types so external consumers
(e.g. platform tooling) can programmatically build otel configs
without maintaining manual YAML templates.
Rename CosmosExtra to SupplementalOptions since the config is not
Cosmos-specific — it fills gaps in upstream otelconf. Drop the
ExtraConfig/OTelConfig wrapper types and the double-parse in
InitializeOpenTelemetry, keeping only SupplementalOptions as the
single exported type.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gjermundgaraba gjermundgaraba force-pushed the gjermund/export-telemetry-types branch from 21f448c to b11604f Compare February 27, 2026 07:17
@gjermundgaraba
Copy link
Contributor Author

@aaronc @aljo242 I made an attempt at a more descriptive name. Not sure if you want to keep the cosmos_extra yaml name or not. Let me know if you like the name, and what to do about the yaml field.

Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

could you update the readme and the example config there too?

@technicallyty
Copy link
Contributor

@aaronc @aljo242 I made an attempt at a more descriptive name. Not sure if you want to keep the cosmos_extra yaml name or not. Let me know if you like the name, and what to do about the yaml field.

how about just extensions for both yaml and the custom struct

@gjermundgaraba
Copy link
Contributor Author

could you update the readme and the example config there too?
Done!

@aaronc @aljo242 I made an attempt at a more descriptive name. Not sure if you want to keep the cosmos_extra yaml name or not. Let me know if you like the name, and what to do about the yaml field.

how about just extensions for both yaml and the custom struct
Updated, let me know what you think?

Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@technicallyty technicallyty enabled auto-merge March 3, 2026 17:46
@technicallyty technicallyty added this pull request to the merge queue Mar 3, 2026
Merged via the queue into main with commit 479e219 Mar 3, 2026
36 of 37 checks passed
@technicallyty technicallyty deleted the gjermund/export-telemetry-types branch March 3, 2026 17:51
warpbuild-benchmark-bot bot added a commit to WarpBuilds/cosmos-sdk that referenced this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants