Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Spring boot package [Threads - data stream]#2981

Merged
mtojek merged 11 commits intoelastic:mainfrom
sunny-elastic:package_spring_boot_threads
Apr 27, 2022
Merged

Spring boot package [Threads - data stream]#2981
mtojek merged 11 commits intoelastic:mainfrom
sunny-elastic:package_spring_boot_threads

Conversation

@sunny-elastic
Copy link
Contributor

@sunny-elasticsunny-elastic commentedApr 3, 2022
edited
Loading

What does this PR do?

  • Generated the skeleton of Spring Boot integration package.
  • AddedThreads data stream
  • Added data collection logic.
  • Added the ingest pipelines.
  • Mapped fields according to the ECS schema and added Fields metadata in the appropriate yml files.
  • Added system test cases.

Checklist

  • I have reviewedtips for building integrations and this pull request is aligned with them.
  • I have verified that Threads data stream collect metrics.
  • I have added an entry to my package'schangelog.yml file.
  • If I'm introducing a new feature, I have modified the Kibana version constraint in my package'smanifest.yml file to point to the latest Elastic stack release (e.g.^8.0.0).

How to test this PR locally

  • Clone integrations repo.
  • Install elastic-package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/spring_boot directory.
  • Run the following command to run tests.

elastic-package test

Note: We have covered dashboards and the visualisations for all data streams of spring boot into separate PR. Also Kibana version will be updated to 8.1.0 in manifest.yml after testing this integration on 8.1.0.

@sunny-elasticsunny-elastic requested a review froma team as acode ownerApril 3, 2022 07:59
@elasticmachine
Copy link

elasticmachine commentedApr 3, 2022
edited
Loading

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline ViewTest ViewChangesArtifactspreviewpreview

Expand to view the summary

Build stats

  • Start Time: 2022-04-27T06:29:26.390+0000

  • Duration: 17 min 39 sec

Test stats 🧪

TestResults
Failed0
Passed16
Skipped0
Total16

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@sunny-elasticsunny-elastic self-assigned thisApr 3, 2022
@sunny-elasticsunny-elastic added enhancementNew feature or request Team:IntegrationsLabel for the Integrations team New IntegrationIssue or pull request for creating a new integration package. labelsApr 3, 2022
@elasticmachine
Copy link

Pinging @elastic/integrations (Team:Integrations)

@mtojekmtojek requested a review fromruflinApril 4, 2022 09:35
- name: threading
type: group
fields:
- name: current_thread
Copy link
Contributor

Choose a reason for hiding this comment

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

What does thecurrent_thread mean in terms of Jolokia request? Which one is the current thread? Should we skip it?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

so this current_thread should be current running thread , it has different values than threads. I think we should keep this.

@sunny-elasticsunny-elastic requested a review froma team as acode ownerApril 20, 2022 11:44
Copy link
Contributor

@kush-elastickush-elastic left a comment

Choose a reason for hiding this comment

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

@sunny-elastic that's all from my end, left some comments.
@mtojek, please take a look and feel free to drop in suggestions/questions.

Comment on lines 44 to 45
title: Collect Spring Boot metrics of Memory and Threading.
description: Collecting metrics from Spring Boot of Memory and Threading.
Copy link
Contributor

Choose a reason for hiding this comment

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

can we update this to something like following:

Suggested change
title:Collect Spring Boot metricsof Memory and Threading.
description:Collecting metrics from Spring Boot of Memory and Threading.
title:Collect Spring Boot metricsusing Jolokia.
description:Collecting metrics from Spring Boot of Memory and Threading using Jolokia.

so in future if there are anymore data-stream that uses same jolokia input, we don't have provide all the types in title.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

yes done

Comment on lines 52 to 66
- name: daemon_thread_count
type: long
description: Current number of live daemon threads
- name: object_monitor_usage_supported
type: boolean
description: Object monitor usage support
- name: peak_thread_count
type: long
description: Peak thread count to the current number of live threads
- name: synchronizer_usage_supported
type: boolean
description: Show the synchronizer usage support
- name: total_started_thread_count
type: long
description: Total number of threads created and also started since the Java virtual machine started
Copy link
Contributor

Choose a reason for hiding this comment

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

can we do this?

Suggested change
-name:daemon_thread_count
type:long
description:Current number of live daemon threads
-name:object_monitor_usage_supported
type:boolean
description:Object monitor usage support
-name:peak_thread_count
type:long
description:Peak thread count to the current number of live threads
-name:synchronizer_usage_supported
type:boolean
description:Show the synchronizer usage support
-name:total_started_thread_count
type:long
description:Total number of threads created and also started since the Java virtual machine started
-name:daemon
type:long
description:Current number of live daemon threads
-name:object_monitor_usage_supported
type:boolean
description:Object monitor usage support
-name:peak
type:long
description:Peak thread count to the current number of live threads
-name:synchronizer_usage_supported
type:boolean
description:Show the synchronizer usage support
-name:total_started
type:long
description:Total number of threads created and also started since the Java virtual machine started

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

yeah make sense, its updated

Copy link
Contributor

@kush-elastickush-elastic left a comment
edited
Loading

Choose a reason for hiding this comment

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

LGTM! Let's wait for other's review.

Copy link
Contributor

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

Few comments on my side.

  1. I'm not sure why do we need to collect these booleans.
  2. I think we need another levelspring_boot.threading.threads.* for metrics likecurrent andstarted (instead of daemon and total_started).

Comment on lines 64 to 71
"allocated_memory": {
"enabled": true,
"supported": true
},
"contention_monitoring": {
"enabled": false,
"supported": true
},
Copy link
Contributor

Choose a reason for hiding this comment

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

What do these metrics mean? They seem to me more like a configuration.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

its updated now and removed the unwanted ones

Comment on lines 73 to 76
"cpu_time": {
"enabled": true,
"supported": true
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Same story here. As a user, I expectedcpu_time but got some booleans.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

we updated the structure and kept only relevant fields

"cpu_time_supported": true,
"user_time": 470000000
},
"daemon": 16,
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this metric mean?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

for daemon ? its number of live daemon threads.

"user_time": 470000000
},
"daemon": 16,
"object_monitor_usage_supported": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Boolean?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

its updated

"daemon": 16,
"object_monitor_usage_supported": true,
"peak": 20,
"synchronizer_usage_supported": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Boolean?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

its updated

"object_monitor_usage_supported": true,
"peak": 20,
"synchronizer_usage_supported": true,
"total_started": 23
Copy link
Contributor

Choose a reason for hiding this comment

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

total_started what?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Total number of threads created and also started since the Java virtual machine started. Updated this hierarchy in structure

@mtojekmtojek self-requested a reviewApril 26, 2022 07:58
Copy link
Contributor

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

requested changes

@sunny-elastic
Copy link
ContributorAuthor

sunny-elastic commentedApr 26, 2022
edited
Loading

Few comments on my side.

  1. I'm not sure why do we need to collect these booleans.
  2. I think we need another levelspring_boot.threading.threads.* for metrics likecurrent andstarted (instead of daemon and total_started).

@mtojek is this following structure looks good to you, since only kept relevant fields which has meaningful values to collect

"spring_boot"{    "threading"{        "threads"{            "current"{                "allocated_bytes",                "time"{                    "cpu",                    "user"                },            },            "count",            "daemon",            "total_started"        }    }}

Here if you see thecurrent object it only specifies the details regarding current thread, butcount , daemon and total started are referring to multiple threads so coming underthreads object. And it has appropriate description given in fields.yml

@mtojek
Copy link
Contributor

Yes, it's a better fit. I'm wondering if we improve it more by applying thisguidance.

Then:

  • count will bevalue
  • total_started will bestarted

@sunny-elastic
Copy link
ContributorAuthor

yeah butcount has a specific meaning here as count of live threads(Current number of live threads including both daemon and non-daemon threads.)
andtotal_started is Total number of threads created and also started since the Java virtual machine started, we can keep this asstarted. let me know what you think

@mtojek
Copy link
Contributor

Ok, let's just change thetotal_started ->started. Otherwise, it LGTM.

@elasticmachine
Copy link

🌐 Coverage report

NameMetrics % (covered/total)Diff
Packages100.0% (2/2)💚
Files100.0% (2/2)💚 2.918
Classes100.0% (2/2)💚 2.918
Methods100.0% (24/24)💚 11.29
Lines93.289% (139/149)👍 3.348
Conditionals100.0% (0/0)💚

@sunny-elastic
Copy link
ContributorAuthor

Ok, let's just change thetotal_started ->started. Otherwise, it LGTM.

Yeah its updated. Thanks!

@mtojekmtojek merged commit614a118 intoelastic:mainApr 27, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ruflinruflinAwaiting requested review from ruflin

2 more reviewers

@mtojekmtojekmtojek approved these changes

@kush-elastickush-elastickush-elastic approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@sunny-elasticsunny-elastic

Labels

enhancementNew feature or requestNew IntegrationIssue or pull request for creating a new integration package.Team:IntegrationsLabel for the Integrations team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@sunny-elastic@elasticmachine@mtojek@kush-elastic@yug-rajani

[8]ページ先頭

©2009-2026 Movatter.jp