Skip to content

Add all agent config to agent.conf file for convenient containerization use cases#7470

Merged
wu-sheng merged 2 commits into
masterfrom
chore/agent-config
Aug 18, 2021
Merged

Add all agent config to agent.conf file for convenient containerization use cases#7470
wu-sheng merged 2 commits into
masterfrom
chore/agent-config

Conversation

@kezhenxu94
Copy link
Copy Markdown
Member

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #. NO
  • Update the CHANGES log.

@kezhenxu94 kezhenxu94 added agent Language agent related. chore Chores about the project, like code cleaning up, typos, upgrading dependencies, etc. labels Aug 17, 2021
@kezhenxu94 kezhenxu94 added this to the 8.8.0 milestone Aug 17, 2021
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 17, 2021

Codecov Report

Merging #7470 (8e7cd5c) into master (39d23c1) will decrease coverage by 2.12%.
The diff coverage is n/a.

❗ Current head 8e7cd5c differs from pull request most recent head 05d6385. Consider uploading reports for the commit 05d6385 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7470      +/-   ##
============================================
- Coverage     58.81%   56.68%   -2.13%     
+ Complexity     4390     4363      -27     
============================================
  Files          1035     1075      +40     
  Lines         26592    27346     +754     
  Branches       2627     2711      +84     
============================================
- Hits          15640    15502     -138     
- Misses         9571    10482     +911     
+ Partials       1381     1362      -19     
Impacted Files Coverage Δ
...rver/storage/plugin/influxdb/query/AlarmQuery.java 6.66% <0.00%> (-73.34%) ⬇️
...ge/plugin/elasticsearch/query/AlarmQueryEsDAO.java 5.71% <0.00%> (-71.43%) ⬇️
...re/logging/core/converters/ThrowableConverter.java 16.66% <0.00%> (-58.34%) ⬇️
...apm/agent/core/remote/AuthenticationDecorator.java 33.33% <0.00%> (-26.67%) ⬇️
...r/storage/plugin/influxdb/query/EventQueryDAO.java 42.06% <0.00%> (-16.67%) ⬇️
...ge/plugin/elasticsearch/query/ESEventQueryDAO.java 59.25% <0.00%> (-14.82%) ⬇️
...m/commons/datacarrier/consumer/ConsumerThread.java 80.55% <0.00%> (-11.12%) ⬇️
...pm/agent/core/remote/EventReportServiceClient.java 72.97% <0.00%> (-10.82%) ⬇️
.../apm/agent/core/remote/LogReportServiceClient.java 40.00% <0.00%> (-10.00%) ⬇️
...p/server/core/analysis/metrics/PercentMetrics.java 90.90% <0.00%> (-9.10%) ⬇️
... and 53 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39d23c1...05d6385. Read the comment docs.

Comment thread CHANGES.md
@kezhenxu94 kezhenxu94 force-pushed the chore/agent-config branch 2 times, most recently from bc6de0f to 0abea49 Compare August 17, 2021 13:39
wu-sheng
wu-sheng previously approved these changes Aug 17, 2021
Copy link
Copy Markdown
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

Once all tests passed, I am good with this.

Comment thread apm-sniffer/config/agent.config Outdated
Comment thread apm-sniffer/config/agent.config Outdated
Comment thread apm-sniffer/config/agent.config Outdated
Copy link
Copy Markdown
Contributor

@mrproliu mrproliu left a comment

Choose a reason for hiding this comment

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

I see some default value is not right with the document, I think we should update too.

Comment thread apm-sniffer/config/agent.config Outdated
Comment thread apm-sniffer/config/agent.config Outdated
Comment thread apm-sniffer/config/agent.config Outdated
Comment thread apm-sniffer/config/agent.config Outdated
Comment thread apm-sniffer/config/agent.config Outdated
# Timeout period of reading topics from the Kafka server, the unit is second.
plugin.kafka.get_topic_timeout=${SW_GET_TOPIC_TIMEOUT:10}
# Kafka producer configuration.
plugin.kafka.consumer_config=${SW_PLUGIN_KAFKA_CONSUMER_CONFIG:}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't see where is using this config item?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it is in KafkaProducerManager#run.

@dmsolr Could you be clear about how to add this property? I mean for a hashmap type.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It is my mistake. The proper configuration item is plugin.kafka.producer_config.

The format is

plugin.kafka.producer_config[key]=value

and the key list was here.
I do not try to set it in JVM Options. It seems that you can't do it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@kezhenxu94 Any preference to do this? This mode is hard to override through system env. We can't list them all, they are too many.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@kezhenxu94 Any preference to do this? This mode is hard to override through system env. We can't list them all, they are too many.

What about avoiding the key in the config key, for example plugin.kafka.producer_config=key1=value1,key2=value2, if we could use JSON in agent, we may use plugin.kafka.producer_config={"key":"val"}?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

plugin.kafka.producer_config=key1=value1,key2=value2

I prefer to support this first in the agent initialization through another PR? @dmsolr Could you do this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

plugin.kafka.producer_config=key1=value1,key2=value2
It is good to me.

@dmsolr Could you do this?
Sure.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please create an issue to track this.

@wu-sheng wu-sheng requested a review from mrproliu August 18, 2021 00:05
wu-sheng
wu-sheng previously approved these changes Aug 18, 2021
@wu-sheng
Copy link
Copy Markdown
Member

I rerun the Kafka e2e. The Kafka/Meter is always unstable :(

@wu-sheng
Copy link
Copy Markdown
Member

@kezhenxu94 Could you check meter e2e? It seems failing again.

@wu-sheng wu-sheng merged commit 6bb4d35 into master Aug 18, 2021
@wu-sheng wu-sheng deleted the chore/agent-config branch August 18, 2021 02:25
@wu-sheng wu-sheng modified the milestones: 8.8.0, Java - 8.8.0 Aug 27, 2021
@dashanji
Copy link
Copy Markdown
Member

I find some configurations are in configurations.md , but not in the agent.config , such as agent.trace_segment_ref_limit_per_spanagent.instance_properties[key]=value . Otherwise , the configuration plugin.dubbo.consumer_provider_length_threshold in the agent.config is not the same as plugin.dubbo.provider_arguments_length_threshold in the configurations.md.

@wu-sheng
Copy link
Copy Markdown
Member

I find some configurations are in configurations.md , but not in the agent.config , such as agent.trace_segment_ref_limit_per_spanagent.instance_properties[key]=value . Otherwise , the configuration plugin.dubbo.consumer_provider_length_threshold in the agent.config is not the same as plugin.dubbo.provider_arguments_length_threshold in the configurations.md.

If there are names mismatch or missing, submit a pull request to fix directly.
Things like agent.instance_properties[key]=value are not pre-defined by SkyWalking, we don't know what to add.

@kezhenxu94
Copy link
Copy Markdown
Member Author

kezhenxu94 commented Sep 19, 2021

I find some configurations are in configurations.md , but not in the agent.config , such as agent.trace_segment_ref_limit_per_spanagent.instance_properties[key]=value . Otherwise , the configuration plugin.dubbo.consumer_provider_length_threshold in the agent.config is not the same as plugin.dubbo.provider_arguments_length_threshold in the configurations.md.

@dashanji can you open a pull request to fix this? For agent.instance_properties[xxx], I think we also need to migrate to the format of agent.instance_properties_json={}. plugin.dubbo.consumer_provider_length_threshold should be typo of plugin.dubbo.consumer_length_threshold

@dashanji
Copy link
Copy Markdown
Member

I find some configurations are in configurations.md , but not in the agent.config , such as agent.trace_segment_ref_limit_per_spanagent.instance_properties[key]=value . Otherwise , the configuration plugin.dubbo.consumer_provider_length_threshold in the agent.config is not the same as plugin.dubbo.provider_arguments_length_threshold in the configurations.md.

@dashanji can you open a pull request to fix this? For agent.instance_properties[xxx], I think we also need to migrate to the format of agent.instance_properties_json={}. plugin.dubbo.consumer_provider_length_threshold should be typo of plugin.dubbo.consumer_length_threshold

OK.

@dashanji
Copy link
Copy Markdown
Member

I find some configurations are in configurations.md , but not in the agent.config , such as agent.trace_segment_ref_limit_per_spanagent.instance_properties[key]=value . Otherwise , the configuration plugin.dubbo.consumer_provider_length_threshold in the agent.config is not the same as plugin.dubbo.provider_arguments_length_threshold in the configurations.md.

If there are names mismatch or missing, submit a pull request to fix directly.
Things like agent.instance_properties[key]=value are not pre-defined by SkyWalking, we don't know what to add.

OK , I will open a pull request to fix it.

@wu-sheng
Copy link
Copy Markdown
Member

agent.instance_properties_json={} should be a new feature, rather than a fix. @dashanji If you like, please submit another new(not the wrong names fix) PR to add this.

@dashanji
Copy link
Copy Markdown
Member

agent.instance_properties_json={} should be a new feature, rather than a fix. @dashanji If you like, please submit another new(not the wrong names fix) PR to add this.

Sorry I don't know much about java, so I can't realize this feature at present.

@wu-sheng
Copy link
Copy Markdown
Member

agent.instance_properties_json={} should be a new feature, rather than a fix. @dashanji If you like, please submit another new(not the wrong names fix) PR to add this.

Sorry I don't know much about java, so I can't realize this feature at present.

OK, then if we need someone to add this feature first, otherwise, agent.instance_properties[key]=value can't be added, just purely because we don't know what to add.

But others you proposed, feel free to send a pull request to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Language agent related. chore Chores about the project, like code cleaning up, typos, upgrading dependencies, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants