-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert aws 1.11 SQS receive span suppression tests from groovy to ja…
…va (#10660)
- Loading branch information
Showing
8 changed files
with
392 additions
and
335 deletions.
There are no files selected for viewing
17 changes: 0 additions & 17 deletions
17
...o/opentelemetry/javaagent/instrumentation/awssdk/v1_11/SqsSuppressReceiveSpansTest.groovy
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
.../io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/SqsSuppressReceiveSpansTest.java
This file contains 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,28 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.instrumentation.awssdk.v1_11; | ||
|
||
import com.amazonaws.services.sqs.AmazonSQSAsyncClientBuilder; | ||
import io.opentelemetry.instrumentation.awssdk.v1_11.AbstractSqsSuppressReceiveSpansTest; | ||
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
class SqsSuppressReceiveSpansTest extends AbstractSqsSuppressReceiveSpansTest { | ||
|
||
@RegisterExtension | ||
private static final InstrumentationExtension testing = AgentInstrumentationExtension.create(); | ||
|
||
@Override | ||
protected InstrumentationExtension testing() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
public AmazonSQSAsyncClientBuilder configureClient(AmazonSQSAsyncClientBuilder client) { | ||
return client; | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
...pentelemetry/instrumentation/awssdk/v1_11/instrumentor/SqsSuppressReceiveSpansTest.groovy
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
.../opentelemetry/instrumentation/awssdk/v1_11/instrumentor/SqsSuppressReceiveSpansTest.java
This file contains 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,28 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.awssdk.v1_11.instrumentor; | ||
|
||
import com.amazonaws.services.sqs.AmazonSQSAsyncClientBuilder; | ||
import io.opentelemetry.instrumentation.awssdk.v1_11.AbstractSqsSuppressReceiveSpansTest; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.LibraryInstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
public class SqsSuppressReceiveSpansTest extends AbstractSqsSuppressReceiveSpansTest { | ||
|
||
@RegisterExtension | ||
private static final InstrumentationExtension testing = LibraryInstrumentationExtension.create(); | ||
|
||
@Override | ||
protected InstrumentationExtension testing() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
public AmazonSQSAsyncClientBuilder configureClient(AmazonSQSAsyncClientBuilder client) { | ||
return client; | ||
} | ||
} |
20 changes: 0 additions & 20 deletions
20
...t/groovy/io/opentelemetry/instrumentation/awssdk/v1_11/SqsSuppressReceiveSpansTest.groovy
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
.../test/java/io/opentelemetry/instrumentation/awssdk/v1_11/SqsSuppressReceiveSpansTest.java
This file contains 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,31 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.awssdk.v1_11; | ||
|
||
import com.amazonaws.services.sqs.AmazonSQSAsyncClientBuilder; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.LibraryInstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
public class SqsSuppressReceiveSpansTest extends AbstractSqsSuppressReceiveSpansTest { | ||
|
||
@RegisterExtension | ||
private static final InstrumentationExtension testing = LibraryInstrumentationExtension.create(); | ||
|
||
@Override | ||
protected InstrumentationExtension testing() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
public AmazonSQSAsyncClientBuilder configureClient(AmazonSQSAsyncClientBuilder client) { | ||
return client.withRequestHandlers( | ||
AwsSdkTelemetry.builder(testing().getOpenTelemetry()) | ||
.setCaptureExperimentalSpanAttributes(true) | ||
.build() | ||
.newRequestHandler()); | ||
} | ||
} |
Oops, something went wrong.