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

Change from _app and _scope to mp_app and mp_scope #717

Merged
merged 5 commits into from Aug 18, 2022

Conversation

Channyboy
Copy link
Contributor

@Channyboy Channyboy commented Aug 10, 2022

Depends on the following to be merged first.
#707
*^This PR is based off of this as it needs to change text that was added in #707
and
#709

Depends on #709 first before TCKs can be updated.

DRAFT as there still requires changed in TCK.

Fixes #705
(^branch erroneously named as 700 )

REST TCKs in #709 are more explicit in checking Prometheus output in that there are more tests now.
Those tests check for the previous scope/_scope tag which will now be changed to mp_scope.

@@ -152,7 +154,7 @@ Global tags and tags registered with the metric are included in the output retur

Global tags MUST NOT be added to the `MetricID` objects. Global tags must be included in list of tags when metrics are exported.

NOTE: In application servers with multiple applications deployed, there is one reserved tag name: `_app`, which serves for
NOTE: In application servers with multiple applications deployed, there is one reserved tag name: `mp_app`, which serves for
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not line up with the addition of mp_scope so there is no longer just one reserved tag name. Maybe change this to something like:

NOTE: In application servers with multiple applications deployed, values of the reserved tag mp_app distinguish metrics from...

@@ -154,8 +154,8 @@ Global tags and tags registered with the metric are included in the output retur

Global tags MUST NOT be added to the `MetricID` objects. Global tags must be included in list of tags when metrics are exported.

NOTE: In application servers with multiple applications deployed, there is one reserved tag name: `_app`, which serves for
distinguishing metrics from different applications and must not be used for any other purpose. For details,
NOTE: In application servers with multiple applications deployed, values of the reserved tag `mp_app` distinguishing metrics
Copy link
Member

Choose a reason for hiding this comment

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

think there's a grammar issue. maybe change to...

values of the reserved tag mp_app distinguish metrics from ...

It should be possible to override this value by bundling the file `META-INF/microprofile-config.properties` within the application archive
and setting a custom value for the property `mp.metrics.appName` inside it.

It is allowed for application servers to choose to not add the _app tag at all. Implementations may differ in how they handle cases where
It is allowed for application servers to choose to not add the `mp_app`` tag at all. Implementations may differ in how they handle cases where
Copy link
Member

Choose a reason for hiding this comment

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

looks like you have too many single quotes surrounding mp_app on this line

@Channyboy Channyboy requested review from donbourne and removed request for tjquinno August 11, 2022 20:04
Copy link
Member

@donbourne donbourne left a comment

Choose a reason for hiding this comment

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

LGTM

@Channyboy Channyboy requested review from jgallimore, tjquinno and donbourne and removed request for tjquinno August 17, 2022 16:06
@Channyboy
Copy link
Contributor Author

@jgallimore @donbourne @tjquinno Updated with TCK updates

@Channyboy Channyboy changed the title [Draft] Change from _app and _scope to mp_app and mp_scope Change from _app and _scope to mp_app and mp_scope Aug 17, 2022
@@ -118,7 +118,7 @@ public void setA() {
@InSequence(2)
public void testSharedCounter() {

Response resp = given().header("Accept", TEXT_PLAIN).get("/metrics?scope=application");
Response resp = given().header("Accept", TEXT_PLAIN).get("/metrics?mp_scope=application");
Copy link
Member

Choose a reason for hiding this comment

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

mp_scope should be scope in the /metrics querystring

@@ -144,7 +144,7 @@ public void setB() {
@InSequence(4)
public void testSharedCounterAgain() {

Response resp = given().header("Accept", TEXT_PLAIN).get("/metrics?scope=application");
Response resp = given().header("Accept", TEXT_PLAIN).get("/metrics?mp_scope=application");
Copy link
Member

Choose a reason for hiding this comment

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

mp_scope should be scope in the /metrics querystring

Copy link
Member

@donbourne donbourne left a comment

Choose a reason for hiding this comment

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

LGTM

@donbourne donbourne merged commit e4f7470 into eclipse:master Aug 18, 2022
@Channyboy Channyboy deleted the 700-mp_scope_mp_app branch October 3, 2022 17:10
@Channyboy Channyboy added this to the 5.0 milestone Jan 30, 2023
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.

SPEC: Update _app and _scope to mp_app and mp_scope
4 participants