-
Notifications
You must be signed in to change notification settings - Fork 229
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 support for custom analytics data #4078
base: master
Are you sure you want to change the base?
Add support for custom analytics data #4078
Conversation
@@ -1627,7 +1627,7 @@ | |||
<version.jaxb.api>2.4.0-b180830.0359</version.jaxb.api> | |||
<com.sun.jaxb.version>2.3.0</com.sun.jaxb.version> | |||
<com.sun.jaxb.impl.version>2.3.1</com.sun.jaxb.impl.version> | |||
<synapse.version>4.0.0-wso2v216</synapse.version> | |||
<synapse.version>4.0.0-wso2v217-SNAPSHOT</synapse.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not mention snapshot version. Once the synapse version is released with the fix, we can upgrade it here.
updatingLog.setElasticMetadata(dataUnit.getElasticMetadata()); | ||
private void setElasticMetaData(BasicStatisticDataUnit dataUnit, StatisticsLog statisticsLog) { | ||
if (dataUnit.getElasticMetadata() == null) { | ||
dataUnit.generateElasticMetadata(dataUnit.getMessageContext()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we are generating metadata here? Was that logic there before too?
AnalyticsCustomDataProvider customDataProvider = AnalyticsDataProviderHolder.getAnalyticsCustomDataProvider(); | ||
if (customDataProvider != null) { | ||
if (elasticMetadata.getAnalyticsMetadata() == null) { | ||
dataUnit.getMessageContext().setProperty(ANALYTICS_METADATA, new HashMap<String, Object>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can dataunit message context null?
Purpose
Fixes https://github.com/wso2-enterprise/wso2-mi-internal/issues/995
Fixes #4050
Goals
$ subject
Approach
Introduced a
AnalyticsCustomDataProvider
interface that can be implemented by external parties.By adding it to the
lib
directory and specifying its path in thedeployment.toml
, we can add custom analytics data.User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning