[ 
https://issues.apache.org/jira/browse/SUREFIRE-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528042#comment-17528042
 ] 

Delany commented on SUREFIRE-2078:
----------------------------------

In any case, if I set a user property with my build

`mvn test -Dotel.traces.exporter=logging`

I get
{noformat}
[WARNING] The system property otel.traces.exporter is configured twice! The 
property appears in <argLine/> and any of <systemPropertyVariables/>, 
<systemProperties/> or user property.{noformat}
If instead of _user property_ and _argLine_ I employ _user property_ and 
_systemPropertyVariables_ I don't get this message.

> systemPropertyVariables not working
> -----------------------------------
>
>                 Key: SUREFIRE-2078
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2078
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 3.0.0-M6
>            Reporter: Delany
>            Priority: Major
>
> Hi. Im trying to use the opentelemetry java agent, but either surefire is not 
> passing through the parameters, or the agent is not picking them up.
> It works if I pass via the {*}argLine{*}, but not via 
> *systemPropertyVariables* or {*}systemProperties{*}.
> [https://maven.apache.org/surefire/maven-surefire-plugin/examples/system-properties.html]
> [https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/]
> Here is my up-to-date reproducer
> [https://github.com/delanym/java-maven-junit-helloworld/tree/opentelemetry]
> Run `mvn test` and you should get a line on the console like
> {noformat}
> [otel.javaagent 2022-04-26 10:33:44:015 +0200] [main] INFO 
> io.opentelemetry.exporter.logging.LoggingSpanExporter - 
> 'HelloTest.testSayHelloAFewTimes' : be46c05e6d80182590d5289426358fb7 
> e4c666619bfc7c2d INTERNAL [tracer: io.opentelemetry.opentelemetry-anno
> tations-1.0:1.13.0-alpha] AttributesMap{data={thread.id=1, thread.name=main}, 
> capacity=128, totalAddedValues=2}{noformat}
> Try to use the systemPropertyVariables instead and it will not show.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to