Skip to content

Commit eccfa1a

Browse files
Copilottrask
andauthored
Remove unused duplicate code and improve build configuration (#79)
* Initial plan * Initial analysis of repository for unused code identification Co-authored-by: trask <[email protected]> * Remove duplicate sampling percentage logic from SecondEntryPoint Co-authored-by: trask <[email protected]> * Add Kotlin build artifacts to .gitignore and remove committed build artifact Co-authored-by: trask <[email protected]> * Revert .gitignore changes as requested Co-authored-by: trask <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: trask <[email protected]> Co-authored-by: Trask Stalnaker <[email protected]>
1 parent c01b016 commit eccfa1a

File tree

1 file changed

+0
-7
lines changed
  • agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init

1 file changed

+0
-7
lines changed

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/SecondEntryPoint.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,20 +166,13 @@ public void customize(AutoConfigurationCustomizer autoConfiguration) {
166166

167167
TelemetryClient.setActive(telemetryClient);
168168

169-
// TODO (heya) remove duplicate code in both RuntimeConfigurator and SecondEntryPoint
170169
RuntimeConfigurator runtimeConfigurator =
171170
new RuntimeConfigurator(
172171
telemetryClient,
173172
() -> logFilteringProcessor,
174173
configuration,
175174
heartbeatTelemetryItemConsumer,
176175
tempDir);
177-
178-
if (configuration.sampling.percentage != null) {
179-
BytecodeUtilImpl.samplingPercentage = configuration.sampling.percentage.floatValue();
180-
} else {
181-
BytecodeUtilImpl.samplingPercentage = 100;
182-
}
183176
BytecodeUtilImpl.featureStatsbeat = statsbeatModule.getFeatureStatsbeat();
184177
BytecodeUtilImpl.runtimeConfigurator = runtimeConfigurator;
185178
BytecodeUtilImpl.connectionStringConfiguredAtRuntime =

0 commit comments

Comments
 (0)