Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Release Notes.
* Add tags `mq.message.keys` and `mq.message.tags` for RocketMQ producer span
* Clean the trace context which injected into Pulsar MessageImpl after the instance recycled
* Fix In the higher version of mysql-connector-java 8x, there is an error in the value of db.instance.
* Add support for KafkaClients 3.2.x
* Add support for KafkaClients 3.x.

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.

@lujiajing1126 I made this. As #429 missed to correct versions.

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.

Thx, I forgot to fix it there

* Support to customize the collect period of JVM relative metrics.

#### Documentation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ public static class Jvm {
* The buffer size of collected JVM info.
*/
public static int BUFFER_SIZE = 60 * 10;
/**
* The period in seconds of JVM metrics collection.
*/
public static int METRICS_COLLECT_PERIOD = 1;
}

public static class Log {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.skywalking.apm.agent.core.boot.DefaultImplementor;
import org.apache.skywalking.apm.agent.core.boot.DefaultNamedThreadFactory;
import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
import org.apache.skywalking.apm.agent.core.conf.Config;
import org.apache.skywalking.apm.agent.core.jvm.clazz.ClassProvider;
import org.apache.skywalking.apm.agent.core.jvm.cpu.CPUProvider;
import org.apache.skywalking.apm.agent.core.jvm.gc.GCProvider;
Expand Down Expand Up @@ -66,7 +67,7 @@ public void handle(Throwable t) {
LOGGER.error("JVMService produces metrics failure.", t);
}
}
), 0, 1, TimeUnit.SECONDS);
), 0, Config.Jvm.METRICS_COLLECT_PERIOD, TimeUnit.SECONDS);
sendMetricFuture = Executors.newSingleThreadScheduledExecutor(
new DefaultNamedThreadFactory("JVMService-consume"))
.scheduleAtFixedRate(new RunnableWithExceptionProtection(
Expand Down
2 changes: 2 additions & 0 deletions apm-sniffer/config/agent.config
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ correlation.value_max_length=${SW_CORRELATION_VALUE_MAX_LENGTH:128}
correlation.auto_tag_keys=${SW_CORRELATION_AUTO_TAG_KEYS:}
# The buffer size of collected JVM info.
jvm.buffer_size=${SW_JVM_BUFFER_SIZE:600}
# The period in seconds of JVM metrics collection.
Comment thread
wu-sheng marked this conversation as resolved.
Outdated
jvm.metrics_collect_period=${SW_JVM_METRICS_COLLECT_PERIOD:1}
# The buffer channel size.
buffer.channel_size=${SW_BUFFER_CHANNEL_SIZE:5}
# The buffer size.
Expand Down
1 change: 1 addition & 0 deletions docs/en/setup/service-agent/java-agent/configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ This is the properties list supported in `agent/config/agent.config`.
| `correlation.value_max_length` | Max value length of each element. | SW_CORRELATION_VALUE_MAX_LENGTH | `128` |
| `correlation.auto_tag_keys` | Tag the span by the key/value in the correlation context, when the keys listed here exist. | SW_CORRELATION_AUTO_TAG_KEYS | `""` |
| `jvm.buffer_size` | The buffer size of collected JVM info. | SW_JVM_BUFFER_SIZE | `60 * 10` |
| `jvm.metrics_collect_period` | The period in seconds of JVM metrics collection. | SW_JVM_METRICS_COLLECT_PERIOD | `1` |
Comment thread
wu-sheng marked this conversation as resolved.
Outdated
| `buffer.channel_size` | The buffer channel size. | SW_BUFFER_CHANNEL_SIZE | `5` |
| `buffer.buffer_size` | The buffer size. | SW_BUFFER_BUFFER_SIZE | `300` |
| `profile.active` | If true, skywalking agent will enable profile when user create a new profile task. Otherwise disable profile. | SW_AGENT_PROFILE_ACTIVE | `true` |
Expand Down