hi guys I try to disable the telemetry by setting ...
# general
b
hi guys I try to disable the telemetry by setting the
PACT_DO_NOT_TRACK
to true (similar to the way I am setting the
pact.verifier.publishResults
to true which works). Unfortunately, I still get at build the message:
Copy code
Please note: we are tracking events anonymously to gather important usage statistics like JVM version and operating system. To disable tracking, set the 'pact_do_not_track' system property or environment variable to 'true'.
which makes me believe it is not working. Is there another way of writing the
PACT_DO_NOT_TRACK
(e.g. with dots)? The Surefire looks like:
Copy code
<systemProperties>
	<property>
	    <name>pact.verifier.publishResults</name>
	    <value>true</value>
	</property>
	<property>
	    <name>PACT_DO_NOT_TRACK</name>
	    <value>true</value>
	</property>
</systemProperties>
Thanks,
b
thank you @Yousaf Nabi (pactflow.io). It worked
🙌 1
can you please update the TELEMETRY page by adding the variable with low case?
it only shows the caps one
y
you can edit the page at the bottom, there is a little pencil 👍 ty
good catch 👍
b
oki, will do
last thing: I wanted to disable the telemetry because it was causing an err in our CI\CD
Copy code
2023-02-03 12:13:40.891  WARN   --- [       Thread-4] au.com.dius.pact.core.support.Metrics    : 
            Please note: we are tracking events anonymously to gather important usage statistics like JVM version
            and operating system. To disable tracking, set the 'pact_do_not_track' system property or environment
            variable to 'true'.
            
Error: Exception in thread "Thread-4" java.lang.NoSuchMethodError: org.apache.commons.codec.digest.DigestUtils.<init>(Ljava/security/MessageDigest;)V
	at au.com.dius.pact.core.support.Metrics.hostnameHash(Metrics.kt:150)
	at au.com.dius.pact.core.support.Metrics.access$hostnameHash(Metrics.kt:74)
	at au.com.dius.pact.core.support.Metrics$sendMetrics$1.run(Metrics.kt:104)
	at java.lang.Thread.run(Thread.java:750)
Copy code
Build
org.apache.commons.codec.digest.DigestUtils.<init>(Ljava/security/MessageDigest;)V
dunno if it was a conflict with smth that we have, but the first thing to do was to remove it completely.
y
Was this in Pact-JVM? Would you mind raising an issue on GitHub, when you get some time (no rush). This is less than ideal, and glad you have a workaround. Ideally the metrics would work, without fail, or if they do fail, fail gracefully and allow the Pact framework to work as expected!
thanks for reporting as always @Basu Silviu
b
strangely, it does work despite throwing this err. The build completes as green and it moves to the next stage (Can-I-Deploy)
message has been deleted
y
have you got an
if: always()
or any special conditions in your workflow?
b
not at all