Skip to content

chore: make it easier to pass resource agent name and version#212

Merged
tim-mwangi merged 2 commits intomainfrom
configurable-version
Mar 6, 2023
Merged

chore: make it easier to pass resource agent name and version#212
tim-mwangi merged 2 commits intomainfrom
configurable-version

Conversation

@tim-mwangi
Copy link
Copy Markdown
Collaborator

Description

This will make it easier for consumers of this module to pass their own agent names and versions.

Testing

Unit tests and tested locally

Checklist:

  • [✅ ] My changes generate no new warnings

This will make it easier for consumers of this module to pass thheir own agent names and versions.
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 3, 2023

Codecov Report

Merging #212 (1f15918) into main (906c67e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #212      +/-   ##
==========================================
+ Coverage   58.71%   58.73%   +0.01%     
==========================================
  Files          55       55              
  Lines        2231     2232       +1     
==========================================
+ Hits         1310     1311       +1     
  Misses        862      862              
  Partials       59       59              
Impacted Files Coverage Δ
instrumentation/opentelemetry/init.go 82.35% <100.00%> (+0.05%) ⬆️
instrumentation/opentelemetry/init_additional.go 79.10% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

// InitWithSpanProcessorWrapper initializes opentelemetry tracing with a wrapper over span processor
// and returns a shutdown function to flush data immediately on a termination signal.
func InitWithSpanProcessorWrapper(cfg *config.AgentConfig, wrapper SpanProcessorWrapper) func() {
func InitWithSpanProcessorWrapper(cfg *config.AgentConfig, wrapper SpanProcessorWrapper,
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.

Just curious, what is the advantage of passing around the func rather than the slice?

Secondary is, can the versionInfo be const?

Copy link
Copy Markdown
Collaborator Author

@tim-mwangi tim-mwangi Mar 3, 2023

Choose a reason for hiding this comment

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

I could make it a var which will be an attribute/key-pair array.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

@tim-mwangi tim-mwangi merged commit b4bb754 into main Mar 6, 2023
@tim-mwangi tim-mwangi deleted the configurable-version branch March 6, 2023 17:58
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.

3 participants