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

[cmd/mdatagen] Add support for declaring feature gates in metadata.yaml file #21801

Open
9 tasks
mx-psi opened this issue May 11, 2023 · 13 comments
Open
9 tasks
Assignees
Labels
cmd/mdatagen mdatagen command Contribfest enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed never stale Issues marked with this label will be never staled and automatically removed priority:p2 Medium

Comments

@mx-psi
Copy link
Member

mx-psi commented May 11, 2023

Component(s)

cmd/mdatagen

Describe the issue you're reporting

Components can use feature gates to have support for experimental functionality. We can add these to metadata.yaml together with a description. This information can then be used for code generation, documentation generation and by other consumers of the metadata.yaml file (e.g. it could be useful for a remote management system that wants to show a list of available feature gates).

Note that some feature gates do not fit a specific component (e.g. some of the ones we have in the core distro, or the one on pkg/translator/prometheus). These would not be listed for now.

Follow up tasks for individual components once support for this is available:

  • Move feature gate(s) to metadata.yaml for receiver/elasticsearchreceiver
  • Move feature gate(s) to metadata.yaml for receiver/dockerstatsreceiver
  • Move feature gate(s) to metadata.yaml for receiver/nginxreceiver
  • Move feature gate(s) to metadata.yaml for receiver/prometheusreceiver
  • Move feature gate(s) to metadata.yaml for processor/servicegraphprocessor
  • Move feature gate(s) to metadata.yaml for receiver/postgresqlreceiver
  • Move feature gate(s) to metadata.yaml for exporter/googlecloudexporter
  • Move feature gate(s) to metadata.yaml for exporter/datadogexporter
  • Move feature gate(s) to metadata.yaml for processor/spanmetricsprocessor
@mx-psi mx-psi added enhancement New feature or request priority:p2 Medium cmd/mdatagen mdatagen command labels May 11, 2023
@github-actions
Copy link
Contributor

Pinging code owners for cmd/mdatagen: @dmitryax. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@psk001
Copy link

psk001 commented Jul 10, 2023

Hi @mx-psi , is this issue still up for grab? Can I take it?

@mx-psi
Copy link
Member Author

mx-psi commented Jul 10, 2023

Hi @mx-psi , is this issue still up for grab? Can I take it?

Sure, feel free to work on it @psk001 :) The first step is to make the necessary changes on cmd/mdatagen to support this, by adding the new feature gates section.

cc @mackjmr since you were also interested on this one

@psk001
Copy link

psk001 commented Jul 10, 2023

Great, starting with it

@psk001
Copy link

psk001 commented Jul 15, 2023

Needed a little help on it, I am referring to featureGate in opentelemetry-collector. Is this the correct way to implement it?

@mx-psi
Copy link
Member Author

mx-psi commented Jul 17, 2023

@psk001 yes, that's what we are talking about :) We would need to define an equivalent YAML schema to then generate the code that creates a feature gate for each of the components listed above

@psk001
Copy link

psk001 commented Jul 18, 2023

Great, on it

@psk001
Copy link

psk001 commented Jul 18, 2023

Components can use feature gates to have support for experimental functionality. We can add these to metadata.yaml together with a description.

In the metadata.yaml file , is this how it should be added ?

feature-gates:
  SplitTraces:
    description: |
      It returns one ptrace.
      Traces for each trace in the given ptrace.Traces input. Each of the resulting ptrace.Traces contains exactly one trace.
  
  SplitLogs:
    description: |
      It returns one plog.
      Logs for each trace in the given plog.Logs input. Each of the resulting plog.Logs contains exactly one log.

@mx-psi
Copy link
Member Author

mx-psi commented Jul 19, 2023

@psk001 that sounds good to me. My wording was too specific on the original post, they should have a description as well as the other fields that are needed to define feature gates. For example, here you can see other fields being used:

// Upgrade to StageBeta in v0.83.0
var enableRFC3339Timestamp = featuregate.GlobalRegistry().MustRegister(
"k8sattr.rfc3339",
featuregate.StageAlpha,
featuregate.WithRegisterDescription("When enabled, uses RFC3339 format for k8s.pod.start_time value"),
featuregate.WithRegisterFromVersion("v0.82.0"),
)

@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Sep 18, 2023
@mx-psi mx-psi removed the Stale label Sep 18, 2023
@TylerHelmuth TylerHelmuth added Contribfest and removed help wanted Extra attention is needed labels Oct 23, 2023
@TylerHelmuth TylerHelmuth added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 13, 2023
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Feb 12, 2024
@mx-psi mx-psi added never stale Issues marked with this label will be never staled and automatically removed and removed Stale labels Feb 12, 2024
@narcis96
Copy link
Contributor

narcis96 commented Oct 15, 2024

I am continuing the work on this feature (As discussed with @mx-psi )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/mdatagen mdatagen command Contribfest enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed never stale Issues marked with this label will be never staled and automatically removed priority:p2 Medium
Projects
None yet
Development

No branches or pull requests

4 participants