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

remove idleCount in druid plugin #679

Merged
merged 3 commits into from
Apr 10, 2024
Merged

Conversation

AlchemyDing
Copy link
Contributor

In fact, in the druid, PoolingCount and idleCount represent the same meaning.

associate issue in opentelemetry-java-instrumentation

@wu-sheng
Copy link
Member

Pending on OTEL side discussion, as I want to keep the whole context continuous.

@wu-sheng
Copy link
Member

Your fix at OTEL-java side seems different. Could you explain more here or need to align with that?

@AlchemyDing
Copy link
Contributor Author

idleCount should be druidDataSource.getPoolingCount()
But this way it's the same as poolingCount.
https://github.com/apache/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/druid-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/druid/v1/PoolingAddDruidDataSourceInterceptor.java#L63
Because the idleCount is not present in the druidDataSource, I removed the idleCount.

@wu-sheng
Copy link
Member

So, Druid pool doesn't have an idle concept? Then what is the status of the connection after it is used?

@AlchemyDing
Copy link
Contributor Author

AlchemyDing commented Apr 10, 2024

Poolingcount represents the concept of idle

@wu-sheng
Copy link
Member

Poolingcount represents the concept of idle

Then why don't put Poolingcount to idle, and idle + activeCount(maybe?) as the real poolingCount?
The reason I am asking about this is, that I want to make metrics meanings aligned with general understanding.

If this is able to apply, please add comments in the codes why we change like this.

@wu-sheng
Copy link
Member

BTW, as a metric label is removed, the CI fails as expected. Let's focus on the above question first.

@AlchemyDing
Copy link
Contributor Author

Poolingcount represents the concept of idle

Then why don't put Poolingcount to idle, and idle + activeCount(maybe?) as the real poolingCount? The reason I am asking about this is, that I want to make metrics meanings aligned with general understanding.

If this is able to apply, please add comments in the codes why we change like this.

Of course, this is possible.
But before that, I also have a question. I searched for the code of skywalking-java and found that only the druid plugin has attributes called poolingCount and idleCount. Do we need to change the original meaning of the druid for these two attributes in APM, perhaps we need a standardized semantic convention?
WDYT?

@wu-sheng
Copy link
Member

Of course, this is possible.
But before that, I also have a question. I searched for the code of skywalking-java and found that only the druid plugin has attributes called poolingCount and idleCount. Do we need to change the original meaning of the druid for these two attributes in APM, perhaps we need a standardized semantic convention?

Good question. It should be good to remove that, rather than recalculate.

__

Meanwhile, to make CI passed, you should fix the expected file.

- meterId:
name: datasource
tags:
- {name: name, value: test_mysql-server:3306}
- {name: status, value: idleCount}

@AlchemyDing
Copy link
Contributor Author

Therefore, I have a proposal to standardize our semantic conventions, which can avoid potential semantic ambiguity in the future.

@AlchemyDing
Copy link
Contributor Author

Of course, this is possible.
But before that, I also have a question. I searched for the code of skywalking-java and found that only the druid plugin has attributes called poolingCount and idleCount. Do we need to change the original meaning of the druid for these two attributes in APM, perhaps we need a standardized semantic convention?

Good question. It should be good to remove that, rather than recalculate.

__

Meanwhile, to make CI passed, you should fix the expected file.

- meterId:
name: datasource
tags:
- {name: name, value: test_mysql-server:3306}
- {name: status, value: idleCount}

Done.

@wu-sheng
Copy link
Member

Therefore, I have a proposal to standardize our semantic conventions, which can avoid potential semantic ambiguity in the future.

We should consider that in a way.

@wu-sheng wu-sheng added this to the 9.2.0 milestone Apr 10, 2024
wu-sheng
wu-sheng previously approved these changes Apr 10, 2024
@wu-sheng wu-sheng merged commit bc20c6e into apache:main Apr 10, 2024
188 checks passed
liweiyuan pushed a commit to liweiyuan/skywalking-java that referenced this pull request Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants