open-telemetry / opentelemetry-operator

Kubernetes Operator for OpenTelemetry Collector
Apache License 2.0
1.2k stars 438 forks source link

[autoinstrumentation/apache] Incomplete description in Instrumentation CRD #2198

Open bryan-aguilar opened 1 year ago

bryan-aguilar commented 1 year ago

It appears that the instrumentation CRD spec.apachehttpd.properties has an incomplete description.

https://github.com/open-telemetry/opentelemetry-operator/blame/3b10d4cc4a64511c900343b13d5048408c592d40/config/crd/bases/opentelemetry.io_instrumentations.yaml#L58

apacheHttpd:
  description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation.
  properties:
    attrs:
      description: 'Attrs defines Apache HTTPD agent specific attributes.
        The precedence is: `agent default attributes` > `instrument
        spec attributes` . Attributes are documented at https://github.'
TylerHelmuth commented 1 year ago

After doing some digging I find that this is happening because we limit the description length to 200 when generating the manifest. I played around with that value and if we increase it then this description is fixed, but it also adds a lot of extra text to the other descriptions. Turns out, tons of description are being truncated.

@open-telemetry/operator-maintainers how do you feel about increasing our description length?

jaronoff97 commented 1 year ago

this is a tough balance to strike. I think @pavolloffay set this as an option recently because the CRD length was overflowing the max bytes. I think we should be showing everything in our API docs, but i don't think we can show everything in the CRD because of the overflow issue.

TylerHelmuth commented 1 year ago

I am pretty sure the api docs generation depends on the output of make manifests. The API docs have the same truncation noted here but include the full text when the CRD contains the full text.

jaronoff97 commented 1 year ago

🤦 you're right Can we run make api-docs off of non-truncated text? I think that would be an okay balance to strike.

TylerHelmuth commented 1 year ago

I played around with modifying the api-docs command to generate the crds in a temporary location but then ran into some problems with Kustomize. I'm not very familiar with these tools, but I am pretty sure it is possible.

jaronoff97 commented 1 year ago

Yeah this is def something we should look in to, im not sure what the lift will be. I can dig around a bit today.