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 jvm daemon threads instrumentation #6561

Closed
wants to merge 47 commits into from
Closed

add jvm daemon threads instrumentation #6561

wants to merge 47 commits into from

Conversation

tuhao1020
Copy link

Signed-off-by: HaoTu haotu@alauda.io

Signed-off-by: HaoTu <haotu@alauda.io>
@tuhao1020 tuhao1020 requested a review from a team September 8, 2022 15:11
HaoTu added 3 commits September 9, 2022 00:39
Signed-off-by: HaoTu <haotu@alauda.io>
Signed-off-by: HaoTu <haotu@alauda.io>
Signed-off-by: HaoTu <haotu@alauda.io>
@trask
Copy link
Member

trask commented Sep 8, 2022

I wonder if this would make sense as a boolean daemon attribute (dimension) on process.runtime.jvm.threads.count?

cc @jack-berg @jonatan-ivanov

@jack-berg
Copy link
Member

I think that makes a lot of sense @trask. Can compute daemon vs. non-daemon with:

  • daemon: ThreadMXBead#getDaemonThreadCount()
  • non-daemon: ThreadMXBead#getThreadCount() - ThreadMXBead#getDaemonThreadCount()

Signed-off-by: HaoTu <haotu@alauda.io>
@jonatan-ivanov
Copy link
Member

I agree, especially because that way it is easy to aggregate the daemon + non-daemon threads.

@tuhao1020
Copy link
Author

tuhao1020 commented Sep 13, 2022

@trask @jack-berg @jonatan-ivanov Expect the following?

process.runtime.jvm.threads.count{daemon=true} 2
process.runtime.jvm.threads.count{daemon=false} 5

Should consider adding ThreadMXBean.getPeakThreadCount?

@jonatan-ivanov
Copy link
Member

Yes, if you have 7 threads, 2 of them are daemon and 5 of them are not.

HaoTu added 4 commits September 13, 2022 15:01
…eads

Signed-off-by: HaoTu <haotu@alauda.io>
Signed-off-by: HaoTu <haotu@alauda.io>
Signed-off-by: HaoTu <haotu@alauda.io>
Signed-off-by: HaoTu <haotu@alauda.io>
@tuhao1020
Copy link
Author

@trask

FILE: ./docs/supported-libraries.md
ERROR: 1 dead links found!
  [x] https://www.ibm.com/cloud/websphere-application-server → Status: 404

Signed-off-by: HaoTu <haotu@alauda.io>
@tuhao1020
Copy link
Author

@trask @jack-berg @jonatan-ivanov Can anyeone help to review the code?

Mateusz Rzeszutek and others added 23 commits September 16, 2022 00:43
* Encapsulate actual logging implementation better

* Apply suggestions from code review

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* code review comments

* revert to the old slf4j package name

* spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* Fix instrumentation-api-semconv packages

* Move test

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
….1 (#6596)

Bumps com.gradle.common-custom-user-data-gradle-plugin from 1.8 to 1.8.1.

---
updated-dependencies:
- dependency-name: com.gradle.common-custom-user-data-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add kafka client metrics to the javaagent instrumentation

* Don't override user-set metrics reporter

* Add kafka metric reporter config property
…der (#6587)

* Use ConditionalResourceProvider in the Spring Boot service name provider

* make it a bit simpler

* add order=100

* add comment

* spellcheck
* Add experimental span attribute job.system

* spring-batch
* Optimize ReactorNettyNetClientAttributesGetter

* Update
* Add code attributes for Logback

* Rename property

* Add a note about performance

* Add null check on file name

* Add check on line number

* Fix test following new behavior

* spotless

* Update instrumentation/logback/logback-appender-1.0/library/src/main/java/io/opentelemetry/instrumentation/logback/appender/v1_0/internal/LoggingEventMapper.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Fix test

* Adapt test for Java 18

* codenarc

* Test fix

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
* Reduce dependency on simpleName

* Move ClassNames to internal

* Javadoc

* Updates

* Fix

* Spotless

* Rename

* Add test
* Fix latest dep builds

* fix couchbase 3.2 too

* codenarc

* fix jedis 4.0 tests

* fix restlet 2.0 tests

* fix armeria tests

* Update instrumentation/couchbase/couchbase-3.2/javaagent/src/test/groovy/CouchbaseClient32Test.groovy

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* Update version to 1.19.0-SNAPSHOT

* Update CHANGELOG.md

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* Add resource providers

* Use autoservice annotation
@tuhao1020 tuhao1020 closed this by deleting the head repository Sep 15, 2022
trask pushed a commit that referenced this pull request Sep 24, 2022
Signed-off-by: HaoTu <haotu@alauda.io>

#6561  has closed

Signed-off-by: HaoTu <haotu@alauda.io>
LironKS pushed a commit to helios/opentelemetry-java-instrumentation that referenced this pull request Oct 23, 2022
…etry#6635)

Signed-off-by: HaoTu <haotu@alauda.io>

open-telemetry#6561  has closed

Signed-off-by: HaoTu <haotu@alauda.io>
LironKS pushed a commit to helios/opentelemetry-java-instrumentation that referenced this pull request Oct 31, 2022
…etry#6635)

Signed-off-by: HaoTu <haotu@alauda.io>

open-telemetry#6561  has closed

Signed-off-by: HaoTu <haotu@alauda.io>
LironKS pushed a commit to helios/opentelemetry-java-instrumentation that referenced this pull request Dec 4, 2022
…etry#6635)

Signed-off-by: HaoTu <haotu@alauda.io>

open-telemetry#6561  has closed

Signed-off-by: HaoTu <haotu@alauda.io>
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.

8 participants