File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
sdk/src/main/java/io/opentelemetry/sdk/resources Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -120,27 +120,9 @@ public static Resource getTelemetrySdk() {
120120 */
121121 public static Resource create (Attributes attributes ) {
122122 checkAttributes (Objects .requireNonNull (attributes , "attributes" ));
123- Attributes .Builder attrBuilder = Attributes .newBuilder ();
124- attributes .forEach (new NullValueFilter (attrBuilder ));
125123 return new AutoValue_Resource (attributes );
126124 }
127125
128- private static final class NullValueFilter implements KeyValueConsumer <AttributeValue > {
129- private final Attributes .Builder attrBuilder ;
130-
131- private NullValueFilter (Attributes .Builder attrBuilder ) {
132- this .attrBuilder = attrBuilder ;
133- }
134-
135- @ Override
136- public void consume (String key , AttributeValue value ) {
137- if (value .isEmpty ()) {
138- return ;
139- }
140- attrBuilder .setAttribute (key , value );
141- }
142- }
143-
144126 /**
145127 * Returns a {@link Resource}. This resource information is loaded from the
146128 * OTEL_RESOURCE_ATTRIBUTES environment variable or otel.resource.attributes system properties.
You can’t perform that action at this time.
0 commit comments