Skip to content

Commit 4741e63

Browse files
committed
Comment cleanup
1 parent ca0e0c6 commit 4741e63

File tree

5 files changed

+6
-16
lines changed

5 files changed

+6
-16
lines changed

lib/new_relic/agent/opentelemetry_handler.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
module NewRelic
66
module Agent
77
class OpenTelemetryHandler
8-
# TODO: should you be a singleton? should you be a module? do we need an instance? can we just call a setup method or something?
98
def initialize
109
# no-op without OpenTelemetry API & config
11-
return unless defined?(OpenTelemetry) && NewRelic::Agent.config[:'feature_flag.opentelemetry_bridge']
10+
return unless defined?(OpenTelemetry) &&
11+
NewRelic::Agent.config[:'feature_flag.opentelemetry_bridge']
1212

1313
OpenTelemetryHandler.install_bridge
1414
end
@@ -19,7 +19,6 @@ def self.install_bridge
1919
require 'opentelemetry' # requires the opentelemetry-api gem
2020
require_relative 'opentelemetry/trace'
2121

22-
# TODO: Turn off New Relic instrumentation
2322
::OpenTelemetry.tracer_provider = NewRelic::Agent::OpenTelemetry::Trace::TracerProvider.new
2423
end
2524
end

lib/new_relic/agent/transaction.rb

-5
Original file line numberDiff line numberDiff line change
@@ -951,11 +951,6 @@ def ignore_trace?
951951
@ignore_trace
952952
end
953953

954-
# TODO: THIS IS FOR OTEL AND SHOULD NOT STAY HEERE
955-
def set_attribute(key, value)
956-
current_segment&.set_attribute(key, value)
957-
end
958-
959954
private
960955

961956
def process_cpu

lib/new_relic/agent/transaction/segment.rb

-6
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ def add_custom_attributes(p)
4646
attributes.merge_custom_attributes(p)
4747
end
4848

49-
# TODO: THIS IS AN OTEL OVERRIDE
50-
# IT SHOULD NOT LIVE HERE
51-
def set_attribute(key, value)
52-
add_custom_attributes({key => value})
53-
end
54-
5549
def self.finish(segment)
5650
return unless segment
5751

test/multiverse/suites/hybrid_agent/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Example:
4949
def focus_tests
5050
%w[does_not_create_segment_without_a_transaction]
5151
end
52+
```
5253

5354
```output
5455
$ bermq hybrid_agent

test/multiverse/suites/hybrid_agent/hybrid_agent_test.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ def teardown
2727
# It looks for the snake cased version of the testDescription field in the JSON
2828
# Ex: %w[does_not_create_segment_without_a_transaction] would only run
2929
# `"testDescription": "Does not create segment without a transaction"`
30-
# Using this to add tests individually until the full suite can be run on the CI
30+
#
31+
# Now that we're starting to implement, use this to add tests individually
32+
# until the full suite can be run on the CI
3133
def focus_tests
3234
%w[creates_opentelemetry_segment_in_a_transaction]
33-
# []
3435
end
3536

3637
test_cases = load_cross_agent_test('hybrid_agent')

0 commit comments

Comments
 (0)