- Notifications
You must be signed in to change notification settings - Fork 327
renamed span_frames_min_duration to span_stack_trace_min_duration. Ch… #2220
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
Merged
jackshirazi merged 18 commits into elastic:master from videnkz:stack_trace_span_min_duration Nov 9, 2021
Merged
Changes from all commits
Commits
Show all changes
18 commits Select commit Hold shift + click to select a range
b3c2708 renamed span_frames_min_duration to span_stack_trace_min_duration. Ch…
videnkz 20649aa added entry to changelog
videnkz bd315bc fixed according to comments
videnkz 463642c fixed according to comments
videnkz 5173d3c added StacktraceConfigurationTest
videnkz 4f9d42a added headers
videnkz 8b656ec updated logic and tests
videnkz 2bca395 Update apm-agent-core/src/main/java/co/elastic/apm/agent/impl/stacktr…
videnkz 7ba6924 updated changelog
videnkz 5ec2b50 Update apm-agent-core/src/main/java/co/elastic/apm/agent/impl/stacktr…
videnkz c142e76 Update CHANGELOG.asciidoc
videnkz baf4292 Update apm-agent-core/src/main/java/co/elastic/apm/agent/impl/Elastic…
videnkz b05bcf6 added logic with check default value of spanFramesMinDurationMsValue
videnkz 67a78b6 Merge branch 'stack_trace_span_min_duration' of github.com:kananindzy…
videnkz 2e5897d Merge remote-tracking branch 'origin/master' into stack_trace_span_mi…
felixbarny a1da06e Merge branch 'master' into stack_trace_span_min_duration
felixbarny 6dc841e fixed remaining references to config-span-frames-min-duration
videnkz d53c77f fixed reference in CoreConfiguration
videnkz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions 69 ...-core/src/test/java/co/elastic/apm/agent/impl/stacktrace/StacktraceConfigurationTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
| package co.elastic.apm.agent.impl.stacktrace; | ||
felixbarny marked this conversation as resolved. Show resolved Hide resolved | ||
| | ||
| import co.elastic.apm.agent.configuration.SpyConfiguration; | ||
| import org.junit.jupiter.api.Test; | ||
| import org.stagemonitor.configuration.ConfigurationRegistry; | ||
| import org.stagemonitor.configuration.source.SimpleSource; | ||
| | ||
| import static org.assertj.core.api.Assertions.assertThat; | ||
| | ||
| class StacktraceConfigurationTest { | ||
| | ||
| @Test | ||
| void testGetSpanStackTraceMinDurationMs_whenSpanStackTraceMinDurationNonDefault_thenGetValueFromSpanStackTraceMinDuration() { | ||
| ConfigurationRegistry configRegistry = SpyConfiguration.createSpyConfig(SimpleSource.forTest("span_frames_min_duration", "10ms").add("span_stack_trace_min_duration", "15ms")); | ||
| | ||
| long actual = configRegistry.getConfig(StacktraceConfiguration.class).getSpanStackTraceMinDurationMs(); | ||
| assertThat(actual).isEqualTo(15); | ||
| } | ||
| | ||
| @Test | ||
| void testGetSpanStackTraceMinDurationMs_whenSpanStackTraceDefault_whenSpanFramesNonDefault_thenGetValueFromSpanFramesMinDuration() { | ||
| ConfigurationRegistry configRegistry = SpyConfiguration.createSpyConfig(SimpleSource.forTest("span_frames_min_duration", "15ms")); | ||
| | ||
| long actual = configRegistry.getConfig(StacktraceConfiguration.class).getSpanStackTraceMinDurationMs(); | ||
| assertThat(actual).isEqualTo(15); | ||
| } | ||
| | ||
| @Test | ||
| void testGetSpanStackTraceMinDurationMs_whenSpanStackTraceDefault_whenSpanFramesMinDurationIsZero_thenGetSwappedValueOfSpanFramesMinDuration() { | ||
| ConfigurationRegistry configRegistry = SpyConfiguration.createSpyConfig(SimpleSource.forTest("span_frames_min_duration", "0ms")); | ||
| | ||
| long actual = configRegistry.getConfig(StacktraceConfiguration.class).getSpanStackTraceMinDurationMs(); | ||
| assertThat(actual).isEqualTo(-1); | ||
| } | ||
| | ||
| @Test | ||
| void testGetSpanStackTraceMinDurationMs_whenSpanStackTraceDefault_whenSpanFramesMinDurationIsNegative_thenGetSwappedValueOfSpanFramesMinDuration() { | ||
| ConfigurationRegistry configRegistry = SpyConfiguration.createSpyConfig(SimpleSource.forTest("span_frames_min_duration", "-1ms")); | ||
| | ||
| long actual = configRegistry.getConfig(StacktraceConfiguration.class).getSpanStackTraceMinDurationMs(); | ||
| assertThat(actual).isEqualTo(0); | ||
| } | ||
| | ||
| @Test | ||
| void testGetSpanStackTraceMinDurationMs_defaultValue() { | ||
| ConfigurationRegistry configRegistry = SpyConfiguration.createSpyConfig(); | ||
| | ||
| long actual = configRegistry.getConfig(StacktraceConfiguration.class).getSpanStackTraceMinDurationMs(); | ||
| assertThat(actual).isEqualTo(5); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions 18 ...bbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/AmqpConstants.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions 18 ...q/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchHelper.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions 18 ...bitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchIteratorWrapper.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions 18 ...-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchListWrapper.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions 18 ...ain/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchMessageListenerInstrumentation.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions 18 ...bitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpTransactionHelper.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions 18 .../apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions 18 ...abbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/BatchConfiguration.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.