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

Add instrument.sh script #1354

Merged
merged 23 commits into from
Oct 4, 2022
Merged

Conversation

pellared
Copy link
Member

@pellared pellared commented Oct 3, 2022

Why

Create a script to help set up the auto-instrumentation. It should reduce the possibility of human errors and make it faster+easier to try out.

What

  • Add validation to download.sh
  • Add instrument.sh script to facilitate instrumenting .NET apps (for *nix)

Tests

  • CI (Ubuntu, macOS, Windows) 🎉
  • Locally Ubuntu in WSL

Checklist

  • CHANGELOG.md is updated.
  • Documentation is updated.
  • New features are covered by tests.

@github-actions github-actions bot requested a review from theletterf October 3, 2022 15:10
@pellared pellared changed the title [WIP] Shell scripts Add instrument.sh script Oct 3, 2022
@pellared pellared marked this pull request as ready for review October 3, 2022 18:28
@pellared pellared requested a review from a team October 3, 2022 18:28
.github/ISSUE_TEMPLATE/bug_report.md Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
instrument.sh Outdated Show resolved Hide resolved
instrument.sh Outdated Show resolved Hide resolved
> On macOS [`coreutils`](https://formulae.brew.sh/formula/coreutils) is required.

```sh
curl -fL https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/main/instrument.sh -O
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should point to the release artifact instead of to the actual source. Specially when main is not a release tree.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure as any Writer (approver) can change/remove/add release artifacts. The main branch is extremely protected - requires GPG signatures, also only the maintainers can merge/push to `main. We can consider changing it to a "release tag" during the release process. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

@RassK PTAL #1357

@pellared pellared requested a review from pjanotti October 3, 2022 20:17
docs/README.md Show resolved Hide resolved
@@ -172,6 +174,23 @@ CORECLR_PROFILER_PATH_64
OTEL_DOTNET_AUTO_INTEGRATIONS_FILE
```

You can also use the [instrument.sh](../instrument.sh) script which uses following
Copy link
Contributor

Choose a reason for hiding this comment

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

You might consider breaking the "Instrument a .NET application" section into two smaller sections: 1) Environment variables and 2) Setup script. Based on my reading, that would help make sure someone who already sets the environment variables at the top doesn't try to run the instrument script when they don't have to

Copy link
Member Author

@pellared pellared Oct 3, 2022

Choose a reason for hiding this comment

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

I totally agree. Tomorrow, I will create a separate PR to address it 👍

Copy link
Contributor

@zacharycmontoya zacharycmontoya left a comment

Choose a reason for hiding this comment

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

LGTM with one suggestion

@pellared pellared enabled auto-merge (squash) October 4, 2022 06:26
@pellared pellared merged commit 8fb0af0 into open-telemetry:main Oct 4, 2022
@pellared pellared mentioned this pull request Oct 4, 2022
@pellared pellared deleted the shell-script-fix branch October 31, 2022 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants