FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Move agent config and its dependencies into agent classloader by pavolloffay · Pull Request #322 · hypertrace/javaagent · GitHub

Move agent config and its dependencies into agent classloader - #322

Merged
pavolloffay merged 3 commits into
hypertrace:mainfrom
pavolloffay:fix-grpc
Jun 21, 2021
Merged

Move agent config and its dependencies into agent classloader#322
pavolloffay merged 3 commits into
hypertrace:mainfrom
pavolloffay:fix-grpc

Conversation

pavolloffay commented Jun 17, 2021
edited
Loading

Copy link
Copy Markdown
Member

Signed-off-by: Pavol Loffay p.loffay@gmail.com

Description

Resolves #313

Notable changes:

  • config and its dependencies are moved to agent classloarder. The classes in the agent classloader are totally isolated from the application.
  • shading for proto and jackson is removed - not needed anymore
  • added a new config interface that is backed by old config class. The new interface is located in javaagent-core that lives in the bootstrap classloader. The binding between the interface and proto-based config is done at javaagent bootstrap via component installer SPI.

The whole idea is that javaagent-core is located in the bootstrap classloader hence it should not bring any other 3rd party dependencies. The otel-extensions is located in the agent classloader and can load and use anything bc it is fully isolated from the application.

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
pavolloffay changed the title Move agent config and its deps into agent classloader Move agent config and its dependencies into agent classloader Jun 17, 2021

Copy link
Copy Markdown
Member Author

@ryandens it seems that snyk still fails on the PRs from forks.

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

Copy link
Copy Markdown
Member Author

The CI passes not. Snyk is misconfigured and fails on PRs from forks on

"error-message": "snyk requires an authenticated account. Please run snyk auth and try again.",

Copy link
Copy Markdown
Member Author

The body capture works, tested on https://github.com/grpc/grpc-java/tree/master/examples

pavolloffay requested review from ryandens and shashank11p and removed request for ryandens June 18, 2021 09:48

Copy link
Copy Markdown
Member Author

do not merge yet it needs more love - e.g. remove the filter paths from the instrumentation config. That should not be available to instrumentations.

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

Copy link
Copy Markdown
Member Author

@shashank11p PR updated, could you please re-review?

Copy link
Copy Markdown
Member

@ryandens it seems that snyk still fails on the PRs from forks.

Hey Pavol! Sorry about that would you mind trying out a fix to help this PR along? I think we need to

  1. Swap out --org=hypertrace with --org=$GITHUB_ACTOR
  2. Depending on whether you've done this before, you'll need to login and authorize your github account.

pavolloffay commented Jun 21, 2021
edited
Loading

Copy link
Copy Markdown
Member Author

I am not sure if that will work, most likely the secret is not present in PRs from forks https://github.com/pavolloffay/javaagent/blob/52f0a2d388ce5951e4627f6f18c0fa0f9e4f12a1/.github/workflows/build.yaml#L82.

This repository has the same snyk setting as other HT repos e.g. https://github.com/hypertrace/hypertrace-service/blob/main/.github/workflows/pr-build.yml#L79. I will leave this as it is, somebody from the team should fix it so that PRs from the community are not turning red.

EDIT: snyk passed on hypertrace/hypertrace-service#97. I will look at it in a different PR

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

GRPC Instrumentation not adding rpc.body to spans

3 participants


Back | FazBrowse Home | New Git URL