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

Change AccountService from Go to DotNet (auto) #1538

Merged
merged 26 commits into from
Jun 27, 2024

Conversation

RassK
Copy link
Contributor

@RassK RassK commented Apr 19, 2024

Changes

Fixes #589

Changes AccountingService from Go to .NET service.
Uses OpenTelemetry .NET Automatic Instrumentation.

NOTE: It's a first preview of demo app that is instrumented with OpenTelemetry .NET Automatic instrumentation. Some parts are still TBD. Please review and add comments about improvements and missing parts / docs.

Merge Requirements

For new features contributions please make sure you have completed the following
essential items:

  • CHANGELOG.md updated to document new feature additions
  • Appropriate documentation updates in the docs
  • Appropriate Helm chart updates in the helm-charts

Maintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.

src/accountingservice/Dockerfile Outdated Show resolved Hide resolved
src/accountingservice/Dockerfile Outdated Show resolved Hide resolved
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Apr 30, 2024
@github-actions github-actions bot added the helm-update-required Requires an update to the Helm chart when released label Apr 30, 2024
@RassK
Copy link
Contributor Author

RassK commented Apr 30, 2024

Example Jaeger traces:
image
image

CC: @lachmatt @Kielek Should parentless Kafka consume requests be filtered? Seems without additional context these just trash the output.

@RassK RassK marked this pull request as ready for review April 30, 2024 12:57
@RassK RassK requested a review from a team as a code owner April 30, 2024 12:57
@RassK RassK requested a review from Kielek April 30, 2024 12:57
@RassK
Copy link
Contributor Author

RassK commented Apr 30, 2024

After removing EOF

image

@RassK RassK changed the title [Draft] Change AccountService from Go to DotNet (auto) Change AccountService from Go to DotNet (auto) Apr 30, 2024
@puckpuck puckpuck added docs-update-required Requires documentation update and removed Stale labels Apr 30, 2024
@puckpuck
Copy link
Contributor

puckpuck commented Apr 30, 2024

@RassK Can you add a Chanlog entry for this? Also, we will need to update docs and the Helm chart for this. If you need help to prep a PR in those areas, please let us know.

Screenshot 2024-05-13 at 10 53 00 AM

@RassK
Copy link
Contributor Author

RassK commented May 6, 2024

@puckpuck thanks for helping to guide the last steps missing. I have updated the changelog. Would be glad to accept some help with other missing parts as well. It's my first PR to this repo.

@RassK
Copy link
Contributor Author

RassK commented Jun 3, 2024

I'll update the solution when a newer version of otel auto is available.

@julianocosta89
Copy link
Member

@RassK should we keep this PR as a Draft then?

@RassK RassK marked this pull request as draft June 4, 2024 08:19
@RassK
Copy link
Contributor Author

RassK commented Jun 4, 2024

@RassK should we keep this PR as a Draft then?

Sure, I have no preferences there.

Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

# Conflicts:
#	CHANGELOG.md
#	src/accountingservice/go.mod
#	src/accountingservice/go.sum
@RassK
Copy link
Contributor Author

RassK commented Jun 19, 2024

Updated solution (OTel Auto 1.7.0) >
image

@RassK RassK marked this pull request as ready for review June 19, 2024 12:20
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@julianocosta89 julianocosta89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @RassK it looks good, before approving would you mind explaining those log entries?

Accounting service started
[CORECLR_ENABLE_PROFILING, 1]
[CORECLR_PROFILER, {918728DD-259F-4A6A-AC2B-B85E1B658318}]
[CORECLR_PROFILER_PATH, /app/OpenTelemetry.AutoInstrumentation.Native.so]
[DOTNET_RUNNING_IN_CONTAINER, true]
[DOTNET_STARTUP_HOOKS, /app/OpenTelemetry.AutoInstrumentation.StartupHook.dll]

@RassK
Copy link
Contributor Author

RassK commented Jun 19, 2024

Hey @RassK it looks good, before approving would you mind explaining those log entries?

Accounting service started
[CORECLR_ENABLE_PROFILING, 1]
[CORECLR_PROFILER, {918728DD-259F-4A6A-AC2B-B85E1B658318}]
[CORECLR_PROFILER_PATH, /app/OpenTelemetry.AutoInstrumentation.Native.so]
[DOTNET_RUNNING_IN_CONTAINER, true]
[DOTNET_STARTUP_HOOKS, /app/OpenTelemetry.AutoInstrumentation.StartupHook.dll]

That's a quick startup diagnostics (by AccountingService.Helpers that filters relevant environment variables). Due automatic instrumentation is configured mostly by envs, then this could be helpful for a quick diagnosis.

Ideally a built in diagnostics (OTEL_LOG_LEVEL=debug) should do the similar but instead logs to the file.

@julianocosta89
Copy link
Member

I've updated the tracetest to reflect the change, hope you don't mind. 😅

This should be good to go, I'll just wait to see if any other maintainer/approver has something to say.

Thanks for taking care of it 🤩

@RassK
Copy link
Contributor Author

RassK commented Jun 20, 2024

Just need to increase mem limit in the helm chart left? Can anyone help / explain where, I have had 0 connections to helm charts so far 😬

@julianocosta89
Copy link
Member

the Helm chart will not be updated till next version release.

If you want to update it, you can do the memory limit here:
https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-demo/values.yaml#L165

Then you need to bump a minor version here: https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-demo/Chart.yaml#L4

And last you need to run the: make generate-examples CHARTS=opentelemetry-demo.

You could also sync with @rogercoll and add it to his opened PR:
open-telemetry/opentelemetry-helm-charts#1232

Whenever you add it, you will still need to run the make generate command above.

@julianocosta89
Copy link
Member

@puckpuck, @mviitane are you good with this one being merged?

@puckpuck
Copy link
Contributor

I tested again, and all looks fine using a linked span here instead. I will make another PR so the frauddetectionservice goes back to creating a child span instead of a linked span. This will allow us to showcase both examples with a message queue.

@puckpuck puckpuck merged commit 5400099 into open-telemetry:main Jun 27, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-update-required Requires documentation update helm-update-required Requires an update to the Helm chart when released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add dotnet auto instrumentation
6 participants