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

semconvgen: Add a flag for a path to a custom capitalizations file #528

Closed
carrbs opened this issue Mar 15, 2024 · 0 comments · Fixed by #529
Closed

semconvgen: Add a flag for a path to a custom capitalizations file #528

carrbs opened this issue Mar 15, 2024 · 0 comments · Fixed by #529

Comments

@carrbs
Copy link
Contributor

carrbs commented Mar 15, 2024

The capitalizations slice in the semconvgen generator.go file does not include some of the keywords we would like capitalized for the generated metrics in semconv, namely:

  • ASPNETCore
  • JVM

Adding a new optional flag (e.g. capitalizations-path) and appending the strings from the capitalizations file (file type to be determined) to the existing capitalizations slice would provide the flexibility to add these strings (and others, as necessary) without modifying the code in the generator file.

A usage example:

metric-capitalizations.txt

ASPNETCore
JVM

Invoking semconvgen with the new flag:

semconvgen -i "/path/to/semconv/yaml" \
--only=metric  \
-f metric.go \
-t "/path/to/jinja/template" \
--capitalizations-path="/path/to/metric-capitalizations.txt" \
-s "someVersion"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant