envoy icon indicating copy to clipboard operation
envoy copied to clipboard

chore(docs): Update opentelemetry example to show access logs

Open mmanciop opened this issue 1 year ago • 15 comments

Commit Message: Update the OpenTelemetry demo to show access log correlation and a more recent collector Additional Description: This PR updates the OpenTelemetry demo to show how to send access logs to an OpenTelemetry collector, and how to correlate those logs with tracing data (pending #30268). Also, use a more recent build of the OpenTelemetry collector. Risk Level: Low Testing: Manual Docs Changes: None Release Notes: The OpenTelemetry demo has been updated to show access log correlation with tracing data and to use a more recent build of the OpenTelemetry collector Platform Specific Features: N/A [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional API Considerations:]

mmanciop avatar May 02 '24 06:05 mmanciop

Hi @mmanciop, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/33925 was opened by mmanciop.

see: more, trace.

/docs

phlax avatar May 02 '24 12:05 phlax

Docs for this Pull Request will be rendered here:

https://storage.googleapis.com/envoy-pr/33925/docs/index.html

The docs are (re-)rendered each time the CI envoy-presubmit (precheck docs) job completes.

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/33925#issuecomment-2090388199 was created by @phlax.

see: more, trace.

this is the file that needs to be edited to update docs https://github.com/envoyproxy/envoy/blob/main/docs/root/start/sandboxes/opentelemetry.rst

i think lets insert a new step 4 (maybe more) that demonstrates what the config is doing

and this is the rendered docs for this sandbox at current commit https://storage.googleapis.com/envoy-pr/a712ed7/docs/start/sandboxes/opentelemetry.html

once we update we can look at the https://github.com/envoyproxy/envoy/blob/main/examples/opentelemetry/verify.sh which is intended to ~reflect the steps in the docs

Done in 8abd1e33331da13c4a91f8a79ed2f9a488bdb99f

mmanciop avatar May 02 '24 15:05 mmanciop

Preparing the docs I noticed that maybe a little more setup is needed to add attributes. It will take me a little to hammer out :-)

mmanciop avatar May 02 '24 15:05 mmanciop

/docs

mmanciop avatar May 03 '24 08:05 mmanciop

Docs for this Pull Request will be rendered here:

https://storage.googleapis.com/envoy-pr/33925/docs/index.html

The docs are (re-)rendered each time the CI envoy-presubmit (precheck docs) job completes.

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/33925#issuecomment-2092503425 was created by @mmanciop.

see: more, trace.

@mmanciop will review more thoroughly shortly - but copying out ci suggestion to get past (one of) ci fails

  Please fix your editor to ensure:

      - no trailing whitespace
      - no preceding mixed tabs/spaces
      - all files end with a newline

phlax avatar May 03 '24 08:05 phlax

@mmanciop quick docs review

step 5 comes after the see also section which should be last - i would move step 5 -> step 4 and increment current step 5

wrt step 6 - its misplaced here - this should be in the config reference section - but when i checked that it seems that this page is currently missing or ~empty - this is the only config reference i could see https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/stat_sinks/open_telemetry_stat_sink.html

Moved see_also to the end of the page in 93676b8e9d, and deleted the configuration section that is misplaced.

mmanciop avatar May 08 '24 07:05 mmanciop

@mmanciop could you update the verify.sh script and fix formatting so we can see the verify ci running

for ref you can run/test locally (assumes local user has access to Docker socket)

$ cd examples/opentelemetry
$ ./verify.sh

phlax avatar May 10 '24 09:05 phlax

@mmanciop could you update the verify.sh script and fix formatting so we can see the verify ci running

for ref you can run/test locally (assumes local user has access to Docker socket)


$ cd examples/opentelemetry

$ ./verify.sh

@phlax that's what I am working on, but it won't be pretty. The collector debug output cannot currently be formatted to JSON and that's gonna hurt.

mmanciop avatar May 10 '24 10:05 mmanciop

in that case just use grep i reckon - that is ~equivalent to the highlighted lines in console output docs i think

phlax avatar May 10 '24 10:05 phlax

for a stricter test you could fish out the ids and check they match - that would be pretty cool - but i reckon optional

phlax avatar May 10 '24 10:05 phlax

in that case just use grep i reckon - that is ~equivalent to the highlighted lines in console output docs i think

Multiline grep is a portability nightmare in my experience. I cobbled up something that I think is reasonable in 0a71a08107. It won't succeed until #33909 is merged and this PR is rebased on top of it.

mmanciop avatar May 10 '24 11:05 mmanciop

/wait for https://github.com/envoyproxy/envoy/pull/33909

phlax avatar May 15 '24 11:05 phlax

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

github-actions[bot] avatar Jun 14 '24 12:06 github-actions[bot]

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

github-actions[bot] avatar Jun 21 '24 16:06 github-actions[bot]