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

[mdatagen] telemetry codegen outputs illegal Go files #11761

Open
diurnalist opened this issue Nov 26, 2024 · 0 comments · May be fixed by #11762
Open

[mdatagen] telemetry codegen outputs illegal Go files #11761

diurnalist opened this issue Nov 26, 2024 · 0 comments · May be fixed by #11762
Labels
bug Something isn't working

Comments

@diurnalist
Copy link

Describe the bug

When using the telemetry config section, mdatagen outputs code that does not compile due to missing or extra imports.

Steps to reproduce

Run mdatagen on any module that defines an internal telemetry config section.

What version did you use?

0.114.0

What config did you use?

telemetry:
  metrics:
    batch_size_trigger_send:
      enabled: true
      stability:
        level: deprecated
        from: v0.110.0
      description: Number of times the batch was sent due to a size trigger
      unit: "{times}"
      sum:
        value_type: int
        monotonic: true
    request_duration:
      enabled: true
      stability:
        level: alpha
      description: Duration of request
      unit: s
      histogram:
        value_type: double
        bucket_boundaries: [1, 10, 100]
    process_runtime_total_alloc_bytes:
      enabled: true
      stability:
        level: stable
      description: Cumulative bytes allocated for heap objects (see 'go doc runtime.MemStats.TotalAlloc')
      unit: By
      sum:
        async: true
        value_type: int
        monotonic: true
    queue_length:
      enabled: true
      description: This metric is optional and therefore not initialized in NewTelemetryBuilder.
      extended_documentation: For example this metric only exists if feature A is enabled.
      unit: "{items}"
      optional: true
      gauge:
        async: true
        value_type: int
@diurnalist diurnalist added the bug Something isn't working label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant