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

run example/demo error on Mac,no tracing generated #3586

Open
caterchong opened this issue Aug 22, 2024 · 4 comments
Open

run example/demo error on Mac,no tracing generated #3586

caterchong opened this issue Aug 22, 2024 · 4 comments
Assignees
Milestone

Comments

@caterchong
Copy link

Bug Report

Symptom

Mac's chip: Apple M2 pro
docker: docker desktop(v4.33.0). settings->General-> User Rosetta for x86_64/amd64 emulation on Apple Silicon opened.

make

There is no tracing. in demo/log dir, all log files are empty.

check demo-service, /var/log/opentelemetry/dotnet/otel-dotnet-auto-1-Examples.Service-StartupHook-20240822.log

[Error] CLR profiler (64bit) is not found at '/otel-dotnet-auto/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so'. Recheck 'CORECLR_PROFILER_PATH'.

should auto instrument and output tracing normally

bug reason

in demo/otel-dotnet.env

CORECLR_PROFILER_PATH="/otel-dotnet-auto/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so"

It's hard-coded to linux-x64

@RassK
Copy link
Contributor

RassK commented Aug 22, 2024

I guess the emulator outputs environment as Linux. In case of using emulators you may need to tweak the envs manually using https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docs/config.md

@caterchong
Copy link
Author

the emulator outputs the right environment variable , linux with arm64 arch.

docker build works fine, intalls the right so,

/otel-dotnet-auto/linux-arm64/OpenTelemetry.AutoInstrumentation.Native.so

docker-compose.yaml

    env_file:
      - otel-dotnet.env # enables OpenTelemetry .NET Automatic Instrumentation

otel-dotnet.env hardcode CORECLR_PROFILER_PATH with linux-x64 ,which is wrong under mac m2 pro.

/otel-dotnet-auto/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so

@RassK
Copy link
Contributor

RassK commented Aug 29, 2024

the emulator outputs the right environment variable , linux with arm64 arch.

@caterchong Shouldn't it be linux-x64 after the emulation? If emulator outputs arm64 instead of x64, it's definitely wrong.
It should be x64 for the application, so emulator translates x64 to arm64.

@pjanotti
Copy link
Contributor

pjanotti commented Sep 9, 2024

I couldn't get hold of a arm mac to try to repro this. Until some dev on the SIG can get a hold of one it is going to be hard to make progress without detailed repro steps.

@Kielek Kielek modified the milestones: 1.8.0, 1.9.0 Sep 12, 2024
@pjanotti pjanotti assigned Kielek and unassigned pjanotti Oct 2, 2024
@pjanotti pjanotti modified the milestones: 1.9.0, vNext Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants
@caterchong @RassK @pjanotti @Kielek and others