Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MLOB] add LLM obs configs #8076

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

gary-huang
Copy link
Contributor

@gary-huang gary-huang commented Dec 10, 2024

What Does This Do

adds llm observability related configs and some start up behavior that are related to the enablement of llm observability

  1. if dd.llmobs.enabled is set to true and there is no ml app defined - throw error
  2. if dd.llmobs.agentless.enabled is set to true and there is no API key supplied - throw error

java system property success cases
agent mode configuration

$ java -javaagent:/Users/gary.huang/dd/dd-trace-java/dd-java-agent/build/libs/dd-java-agent-1.44.0-SNAPSHOT.jar -Ddd.profiling.enabled=true -XX:FlightRecorderOptions=stackdepth=256 -Ddd.logs.injection=true -Ddd.service=gary-test -Ddd.env=staging -Ddd.trace.debug=true -Ddd.version=1.0 -Ddd.llmobs.enabled=true -Ddd.llmobs.ml.app=gary-test -jar build/libs/rest-service-0.0.1-SNAPSHOT.jar 
...
[dd.trace 2024-12-18 17:05:37:610 -0500] [main] DEBUG datadog.trace.api.Config - Attempting to enable LLM Observability
[dd.trace 2024-12-18 17:05:37:613 -0500] [main] DEBUG datadog.trace.api.Config - LLM Observability enabled for ML app gary-test, agentless mode false
...

agentless mode configuration with API key env var

$ DD_API_KEY=${DDOG_API_KEY} java -javaagent:/Users/gary.huang/dd/dd-trace-java/dd-java-agent/build/libs/dd-java-agent-1.44.0-SNAPSHOT.jar -Ddd.profiling.enabled=true -XX:FlightRecorderOptions=stackdepth=256 -Ddd.logs.injection=true -Ddd.service=gary-test -Ddd.env=staging -Ddd.trace.debug=true -Ddd.version=1.0 -Ddd.llmobs.enabled=true -Ddd.llmobs.ml.app=gary-test -Ddd.llmobs.agentless.enabled=true -jar build/libs/rest-service-0.0.1-SNAPSHOT.jar
...
[dd.trace 2024-12-19 12:10:37:358 -0500] [main] DEBUG datadog.trace.api.Config - Attempting to enable LLM Observability
[dd.trace 2024-12-19 12:10:37:361 -0500] [main] DEBUG datadog.trace.api.Config - LLM Observability enabled for ML app gary-test, agentless mode true
...

env variable success cases
agent mode configuration

$ DD_LLMOBS_ML_APP=gary-test-env java -javaagent:/Users/gary.huang/dd/dd-trace-java/dd-java-agent/build/libs/dd-java-agent-1.44.0-SNAPSHOT.jar -Ddd.profiling.enabled=true -XX:FlightRecorderOptions=stackdepth=256 -Ddd.logs.injection=true -Ddd.service=gary-test -Ddd.env=staging -Ddd.trace.debug=true -Ddd.version=1.0 -jar build/libs/rest-service-0.0.1-SNAPSHOT.jar
...
[dd.trace 2024-12-19 13:13:14:104 -0500] [main] DEBUG datadog.trace.api.Config - Attempting to enable LLM Observability
[dd.trace 2024-12-19 13:13:14:108 -0500] [main] DEBUG datadog.trace.api.Config - LLM Observability enabled for ML app gary-test-env, agentless mode false
...

agentless mode configuration

$ DD_LLMOBS_ENABLED=true DD_LLMOBS_ML_APP=gary-test-env DD_LLMOBS_AGENTLESS_ENABLED=true DD_API_KEY=${DDOG_API_KEY} java -javaagent:/Users/gary.huang/dd/dd-trace-java/dd-java-agent/build/libs/dd-java-agent-1.44.0-SNAPSHOT.jar -Ddd.profiling.enabled=true -XX:FlightRecorderOptions=stackdepth=256 -Ddd.logs.injection=true -Ddd.service=gary-test -Ddd.env=staging -Ddd.trace.debug=true -Ddd.version=1.0 -jar build/libs/rest-service-0.0.1-SNAPSHOT.jar
...
[dd.trace 2024-12-19 18:32:45:378 -0500] [main] DEBUG datadog.trace.api.Config - Attempting to enable LLM Observability
[dd.trace 2024-12-19 18:32:45:381 -0500] [main] DEBUG datadog.trace.api.Config - LLM Observability enabled for ML app gary-test-env, agentless mode true
...

Motivation

Additional Notes

tested with a sample spring app
the following stack satisfies 1

$ java -javaagent:/Users/gary.huang/dd/dd-trace-java/dd-java-agent/build/libs/dd-java-agent-1.44.0-SNAPSHOT.jar -Ddd.profiling.enabled=true -XX:FlightRecorderOptions=stackdepth=256 -Ddd.logs.injection=true -Ddd.service=gary-test -Ddd.env=staging -Ddd.trace.debug=true -Ddd.version=1.0 -Ddd.llmobs.enabled=true -jar build/libs/rest-service-0.0.1-SNAPSHOT.jar
...
[dd.trace 2024-12-18 16:51:33:865 -0500] [main] ERROR datadog.trace.bootstrap.Agent - Throwable thrown while installing the Datadog Agent
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
...
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class datadog.trace.api.Config
	at datadog.trace.instrumentation.log4j2.LoggerConfigInstrumentation.isApplicable(LoggerConfigInstrumentation.java:26)
	at datadog.trace.agent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:203)
	at datadog.trace.agent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:79)
	... 19 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.IllegalArgumentException: Attempt to enable LLM Observability without ML app defined.Please ensure that the name of the ML app is provided through properties or env variable [in thread "main"]
	at datadog.trace.api.Config.<init>(Config.java:1767)
...
	... 13 more
[dd.trace 2024-12-18 16:51:33:873 -0500] [main] ERROR datadog.trace.bootstrap.Agent - Throwable thrown while installing the Datadog Tracer
...

the follow stack satisfies 2

$ java -javaagent:/Users/gary.huang/dd/dd-trace-java/dd-java-agent/build/libs/dd-java-agent-1.44.0-SNAPSHOT.jar -Ddd.profiling.enabled=true -XX:FlightRecorderOptions=stackdepth=256 -Ddd.logs.injection=true -Ddd.service=gary-test -Ddd.env=staging -Ddd.trace.debug=true -Ddd.version=1.0 -Ddd.llmobs.enabled=true -Ddd.llmobs.ml.app=gary-test -Ddd.llmobs.agentless.enabled=true -jar build/libs/rest-service-0.0.1-SNAPSHOT.jar 
...
[dd.trace 2024-12-18 17:07:49:861 -0500] [main] ERROR datadog.trace.bootstrap.Agent - Throwable thrown while installing the Datadog Agent
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class datadog.trace.api.Config
	at datadog.trace.instrumentation.log4j2.LoggerConfigInstrumentation.isApplicable(LoggerConfigInstrumentation.java:26)
	at datadog.trace.agent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:203)
	at datadog.trace.agent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:79)
	... 19 more
Caused by: java.lang.ExceptionInInitializerError: Exception datadog.trace.util.throwable.FatalAgentMisconfigurationError: Attempt to start LLM Observability in Agentless mode without API key. Please ensure that either an API key is configured, or the tracer is set up to work with the Agent [in thread "main"]
	at datadog.trace.api.Config.<init>(Config.java:1773)
	at datadog.trace.api.Config.<clinit>(Config.java:4082)
...
	at datadog.trace.bootstrap.Agent.start(Agent.java:279)
	... 13 more
[dd.trace 2024-12-18 17:07:49:864 -0500] [main] ERROR datadog.trace.bootstrap.Agent - Throwable thrown while installing the Datadog Tracer
java.lang.NoClassDefFoundError: Could not initialize class datadog.trace.api.Config
	at datadog.trace.bootstrap.Agent.createProfilingContextIntegration(Agent.java:980)
	at datadog.trace.bootstrap.Agent.installDatadogTracer(Agent.java:647)
...

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@gary-huang gary-huang force-pushed the gary/add-llmobs-configs branch from 3863387 to 19d2dc3 Compare December 10, 2024 21:32
@pr-commenter
Copy link

pr-commenter bot commented Dec 10, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master gary/add-llmobs-configs
git_commit_date 1735656717 1735664725
git_commit_sha c99c2c2 5259c28
release_version 1.45.0-SNAPSHOT~c99c2c2042 1.45.0-SNAPSHOT~5259c28871
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1735666990 1735666990
ci_job_id 751689488 751689488
ci_pipeline_id 51949992 51949992
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

Found 2 performance improvements and 1 performance regressions! Performance is the same for 54 metrics, 6 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:tracing:Remote Config better
[-41.805µs; -17.834µs] or [-5.898%; -2.516%]
679.008µs 708.827µs
scenario:startup:petclinic:tracing:AppSec worse
[+2.043ms; +6.406ms] or [+3.711%; +11.638%]
59.271ms 55.047ms
scenario:startup:petclinic:tracing:Remote Config better
[-39.224µs; -14.347µs] or [-5.534%; -2.024%]
682.038µs 708.823µs
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~5259c28871, baseline=1.45.0-SNAPSHOT~c99c2c2042

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.054 s) : 0, 1053783
Total [baseline] (10.455 s) : 0, 10454638
Agent [candidate] (1.053 s) : 0, 1052781
Total [candidate] (10.436 s) : 0, 10435736
section appsec
Agent [baseline] (1.185 s) : 0, 1184755
Total [baseline] (10.722 s) : 0, 10722266
Agent [candidate] (1.185 s) : 0, 1185398
Total [candidate] (10.755 s) : 0, 10755448
section iast
Agent [baseline] (1.186 s) : 0, 1185705
Total [baseline] (11.009 s) : 0, 11009239
Agent [candidate] (1.178 s) : 0, 1177864
Total [candidate] (11.065 s) : 0, 11064912
section profiling
Agent [baseline] (1.281 s) : 0, 1281381
Total [baseline] (10.861 s) : 0, 10860765
Agent [candidate] (1.275 s) : 0, 1274626
Total [candidate] (10.825 s) : 0, 10824824
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.054 s -
Agent appsec 1.185 s 130.972 ms (12.4%)
Agent iast 1.186 s 131.923 ms (12.5%)
Agent profiling 1.281 s 227.599 ms (21.6%)
Total tracing 10.455 s -
Total appsec 10.722 s 267.627 ms (2.6%)
Total iast 11.009 s 554.6 ms (5.3%)
Total profiling 10.861 s 406.126 ms (3.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.053 s -
Agent appsec 1.185 s 132.617 ms (12.6%)
Agent iast 1.178 s 125.083 ms (11.9%)
Agent profiling 1.275 s 221.845 ms (21.1%)
Total tracing 10.436 s -
Total appsec 10.755 s 319.712 ms (3.1%)
Total iast 11.065 s 629.176 ms (6.0%)
Total profiling 10.825 s 389.088 ms (3.7%)
gantt
    title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~5259c28871, baseline=1.45.0-SNAPSHOT~c99c2c2042

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (715.567 ms) : 0, 715567
BytebuddyAgent [candidate] (710.681 ms) : 0, 710681
GlobalTracer [baseline] (255.954 ms) : 0, 255954
GlobalTracer [candidate] (255.875 ms) : 0, 255875
AppSec [baseline] (55.047 ms) : 0, 55047
AppSec [candidate] (59.271 ms) : 0, 59271
Remote Config [baseline] (708.823 µs) : 0, 709
Remote Config [candidate] (682.038 µs) : 0, 682
Telemetry [baseline] (11.389 ms) : 0, 11389
Telemetry [candidate] (11.356 ms) : 0, 11356
section appsec
BytebuddyAgent [baseline] (727.636 ms) : 0, 727636
BytebuddyAgent [candidate] (728.584 ms) : 0, 728584
GlobalTracer [baseline] (253.171 ms) : 0, 253171
GlobalTracer [candidate] (252.512 ms) : 0, 252512
AppSec [baseline] (170.66 ms) : 0, 170660
AppSec [candidate] (170.869 ms) : 0, 170869
IAST [baseline] (19.303 ms) : 0, 19303
IAST [candidate] (19.137 ms) : 0, 19137
Remote Config [baseline] (666.202 µs) : 0, 666
Remote Config [candidate] (651.25 µs) : 0, 651
Telemetry [baseline] (8.033 ms) : 0, 8033
Telemetry [candidate] (8.276 ms) : 0, 8276
section iast
BytebuddyAgent [baseline] (833.497 ms) : 0, 833497
BytebuddyAgent [candidate] (827.699 ms) : 0, 827699
GlobalTracer [baseline] (247.657 ms) : 0, 247657
GlobalTracer [candidate] (246.227 ms) : 0, 246227
AppSec [baseline] (58.462 ms) : 0, 58462
AppSec [candidate] (58.502 ms) : 0, 58502
IAST [baseline] (21.684 ms) : 0, 21684
IAST [candidate] (21.272 ms) : 0, 21272
Remote Config [baseline] (676.565 µs) : 0, 677
Remote Config [candidate] (657.576 µs) : 0, 658
Telemetry [baseline] (8.658 ms) : 0, 8658
Telemetry [candidate] (8.554 ms) : 0, 8554
section profiling
BytebuddyAgent [baseline] (706.792 ms) : 0, 706792
BytebuddyAgent [candidate] (701.781 ms) : 0, 701781
GlobalTracer [baseline] (373.262 ms) : 0, 373262
GlobalTracer [candidate] (372.48 ms) : 0, 372480
AppSec [baseline] (54.56 ms) : 0, 54560
AppSec [candidate] (54.103 ms) : 0, 54103
Remote Config [baseline] (678.307 µs) : 0, 678
Remote Config [candidate] (684.85 µs) : 0, 685
Telemetry [baseline] (7.811 ms) : 0, 7811
Telemetry [candidate] (7.884 ms) : 0, 7884
ProfilingAgent [baseline] (96.236 ms) : 0, 96236
ProfilingAgent [candidate] (95.874 ms) : 0, 95874
Profiling [baseline] (96.262 ms) : 0, 96262
Profiling [candidate] (95.899 ms) : 0, 95899
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~5259c28871, baseline=1.45.0-SNAPSHOT~c99c2c2042

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.051 s) : 0, 1050831
Total [baseline] (8.576 s) : 0, 8575839
Agent [candidate] (1.056 s) : 0, 1055583
Total [candidate] (8.589 s) : 0, 8588814
section iast
Agent [baseline] (1.178 s) : 0, 1177614
Total [baseline] (9.188 s) : 0, 9187710
Agent [candidate] (1.181 s) : 0, 1181135
Total [candidate] (9.194 s) : 0, 9193671
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.179 s) : 0, 1179446
Total [baseline] (9.167 s) : 0, 9167050
Agent [candidate] (1.189 s) : 0, 1189188
Total [candidate] (9.236 s) : 0, 9236047
section iast_TELEMETRY_OFF
Agent [baseline] (1.182 s) : 0, 1181892
Total [baseline] (9.211 s) : 0, 9211499
Agent [candidate] (1.173 s) : 0, 1172918
Total [candidate] (9.191 s) : 0, 9191217
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.051 s -
Agent iast 1.178 s 126.783 ms (12.1%)
Agent iast_HARDCODED_SECRET_DISABLED 1.179 s 128.614 ms (12.2%)
Agent iast_TELEMETRY_OFF 1.182 s 131.06 ms (12.5%)
Total tracing 8.576 s -
Total iast 9.188 s 611.872 ms (7.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.167 s 591.212 ms (6.9%)
Total iast_TELEMETRY_OFF 9.211 s 635.66 ms (7.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent iast 1.181 s 125.552 ms (11.9%)
Agent iast_HARDCODED_SECRET_DISABLED 1.189 s 133.605 ms (12.7%)
Agent iast_TELEMETRY_OFF 1.173 s 117.335 ms (11.1%)
Total tracing 8.589 s -
Total iast 9.194 s 604.858 ms (7.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.236 s 647.233 ms (7.5%)
Total iast_TELEMETRY_OFF 9.191 s 602.403 ms (7.0%)
gantt
    title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~5259c28871, baseline=1.45.0-SNAPSHOT~c99c2c2042

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (711.213 ms) : 0, 711213
BytebuddyAgent [candidate] (714.543 ms) : 0, 714543
GlobalTracer [baseline] (256.312 ms) : 0, 256312
GlobalTracer [candidate] (256.358 ms) : 0, 256358
AppSec [baseline] (54.929 ms) : 0, 54929
AppSec [candidate] (58.002 ms) : 0, 58002
Remote Config [baseline] (708.827 µs) : 0, 709
Remote Config [candidate] (679.008 µs) : 0, 679
Telemetry [baseline] (12.688 ms) : 0, 12688
Telemetry [candidate] (11.118 ms) : 0, 11118
section iast
BytebuddyAgent [baseline] (827.817 ms) : 0, 827817
BytebuddyAgent [candidate] (830.916 ms) : 0, 830916
GlobalTracer [baseline] (246.25 ms) : 0, 246250
GlobalTracer [candidate] (247.143 ms) : 0, 247143
AppSec [baseline] (57.753 ms) : 0, 57753
AppSec [candidate] (57.803 ms) : 0, 57803
IAST [baseline] (21.54 ms) : 0, 21540
IAST [candidate] (21.155 ms) : 0, 21155
Remote Config [baseline] (665.828 µs) : 0, 666
Remote Config [candidate] (648.964 µs) : 0, 649
Telemetry [baseline] (8.633 ms) : 0, 8633
Telemetry [candidate] (8.533 ms) : 0, 8533
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (828.497 ms) : 0, 828497
BytebuddyAgent [candidate] (835.161 ms) : 0, 835161
GlobalTracer [baseline] (247.076 ms) : 0, 247076
GlobalTracer [candidate] (249.925 ms) : 0, 249925
AppSec [baseline] (58.206 ms) : 0, 58206
AppSec [candidate] (58.253 ms) : 0, 58253
IAST [baseline] (21.423 ms) : 0, 21423
IAST [candidate] (21.436 ms) : 0, 21436
Remote Config [baseline] (654.297 µs) : 0, 654
Remote Config [candidate] (666.853 µs) : 0, 667
Telemetry [baseline] (8.585 ms) : 0, 8585
Telemetry [candidate] (8.701 ms) : 0, 8701
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (830.149 ms) : 0, 830149
BytebuddyAgent [candidate] (824.236 ms) : 0, 824236
GlobalTracer [baseline] (247.922 ms) : 0, 247922
GlobalTracer [candidate] (246.67 ms) : 0, 246670
AppSec [baseline] (58.388 ms) : 0, 58388
AppSec [candidate] (57.392 ms) : 0, 57392
IAST [baseline] (21.114 ms) : 0, 21114
IAST [candidate] (20.666 ms) : 0, 20666
Remote Config [baseline] (682.807 µs) : 0, 683
Remote Config [candidate] (642.893 µs) : 0, 643
Telemetry [baseline] (8.587 ms) : 0, 8587
Telemetry [candidate] (8.42 ms) : 0, 8420
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-12-31T17:15:33 2024-12-31T17:22:31
git_branch master gary/add-llmobs-configs
git_commit_date 1735656717 1735664725
git_commit_sha c99c2c2 5259c28
release_version 1.45.0-SNAPSHOT~c99c2c2042 1.45.0-SNAPSHOT~5259c28871
start_time 2024-12-31T17:15:19 2024-12-31T17:22:18
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1735666106 1735666106
ci_job_id 751689490 751689490
ci_pipeline_id 51949992 51949992
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~5259c28871, baseline=1.45.0-SNAPSHOT~c99c2c2042
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.347 ms) : 1326, 1368
.   : milestone, 1347,
appsec (1.772 ms) : 1749, 1795
.   : milestone, 1772,
appsec_no_iast (1.739 ms) : 1714, 1764
.   : milestone, 1739,
iast (1.51 ms) : 1488, 1532
.   : milestone, 1510,
profiling (1.521 ms) : 1496, 1546
.   : milestone, 1521,
tracing (1.477 ms) : 1452, 1501
.   : milestone, 1477,
section candidate
no_agent (1.361 ms) : 1342, 1381
.   : milestone, 1361,
appsec (1.778 ms) : 1753, 1803
.   : milestone, 1778,
appsec_no_iast (1.756 ms) : 1731, 1782
.   : milestone, 1756,
iast (1.49 ms) : 1467, 1513
.   : milestone, 1490,
profiling (1.536 ms) : 1511, 1561
.   : milestone, 1536,
tracing (1.494 ms) : 1469, 1518
.   : milestone, 1494,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.347 ms [1.326 ms, 1.368 ms] -
appsec 1.772 ms [1.749 ms, 1.795 ms] 424.712 µs (31.5%)
appsec_no_iast 1.739 ms [1.714 ms, 1.764 ms] 391.966 µs (29.1%)
iast 1.51 ms [1.488 ms, 1.532 ms] 162.981 µs (12.1%)
profiling 1.521 ms [1.496 ms, 1.546 ms] 174.253 µs (12.9%)
tracing 1.477 ms [1.452 ms, 1.501 ms] 129.97 µs (9.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.361 ms [1.342 ms, 1.381 ms] -
appsec 1.778 ms [1.753 ms, 1.803 ms] 416.578 µs (30.6%)
appsec_no_iast 1.756 ms [1.731 ms, 1.782 ms] 394.969 µs (29.0%)
iast 1.49 ms [1.467 ms, 1.513 ms] 128.26 µs (9.4%)
profiling 1.536 ms [1.511 ms, 1.561 ms] 174.54 µs (12.8%)
tracing 1.494 ms [1.469 ms, 1.518 ms] 132.494 µs (9.7%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~5259c28871, baseline=1.45.0-SNAPSHOT~c99c2c2042
    dateFormat X
    axisFormat %s
section baseline
no_agent (373.424 µs) : 354, 393
.   : milestone, 373,
iast (497.255 µs) : 475, 520
.   : milestone, 497,
iast_FULL (656.571 µs) : 635, 678
.   : milestone, 657,
iast_GLOBAL (524.439 µs) : 502, 547
.   : milestone, 524,
iast_HARDCODED_SECRET_DISABLED (489.322 µs) : 468, 511
.   : milestone, 489,
iast_INACTIVE (446.81 µs) : 426, 467
.   : milestone, 447,
iast_TELEMETRY_OFF (478.528 µs) : 457, 500
.   : milestone, 479,
tracing (455.074 µs) : 433, 477
.   : milestone, 455,
section candidate
no_agent (377.297 µs) : 358, 397
.   : milestone, 377,
iast (494.355 µs) : 473, 516
.   : milestone, 494,
iast_FULL (654.48 µs) : 633, 676
.   : milestone, 654,
iast_GLOBAL (527.628 µs) : 505, 550
.   : milestone, 528,
iast_HARDCODED_SECRET_DISABLED (491.168 µs) : 470, 513
.   : milestone, 491,
iast_INACTIVE (453.241 µs) : 432, 475
.   : milestone, 453,
iast_TELEMETRY_OFF (480.283 µs) : 459, 502
.   : milestone, 480,
tracing (456.416 µs) : 436, 477
.   : milestone, 456,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 373.424 µs [353.793 µs, 393.054 µs] -
iast 497.255 µs [474.981 µs, 519.529 µs] 123.831 µs (33.2%)
iast_FULL 656.571 µs [634.907 µs, 678.235 µs] 283.148 µs (75.8%)
iast_GLOBAL 524.439 µs [502.099 µs, 546.78 µs] 151.016 µs (40.4%)
iast_HARDCODED_SECRET_DISABLED 489.322 µs [467.945 µs, 510.698 µs] 115.898 µs (31.0%)
iast_INACTIVE 446.81 µs [426.168 µs, 467.452 µs] 73.387 µs (19.7%)
iast_TELEMETRY_OFF 478.528 µs [457.35 µs, 499.706 µs] 105.104 µs (28.1%)
tracing 455.074 µs [432.681 µs, 477.468 µs] 81.651 µs (21.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 377.297 µs [357.679 µs, 396.915 µs] -
iast 494.355 µs [472.767 µs, 515.944 µs] 117.058 µs (31.0%)
iast_FULL 654.48 µs [632.972 µs, 675.988 µs] 277.183 µs (73.5%)
iast_GLOBAL 527.628 µs [504.971 µs, 550.285 µs] 150.331 µs (39.8%)
iast_HARDCODED_SECRET_DISABLED 491.168 µs [469.66 µs, 512.677 µs] 113.871 µs (30.2%)
iast_INACTIVE 453.241 µs [431.708 µs, 474.774 µs] 75.944 µs (20.1%)
iast_TELEMETRY_OFF 480.283 µs [459.036 µs, 501.53 µs] 102.986 µs (27.3%)
tracing 456.416 µs [435.724 µs, 477.108 µs] 79.119 µs (21.0%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master gary/add-llmobs-configs
git_commit_date 1735656717 1735664725
git_commit_sha c99c2c2 5259c28
release_version 1.45.0-SNAPSHOT~c99c2c2042 1.45.0-SNAPSHOT~5259c28871
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1735666653 1735666653
ci_job_id 751689491 751689491
ci_pipeline_id 51949992 51949992
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~5259c28871, baseline=1.45.0-SNAPSHOT~c99c2c2042
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.471 ms) : 1459, 1482
.   : milestone, 1471,
appsec (2.346 ms) : 2304, 2388
.   : milestone, 2346,
iast (2.082 ms) : 2029, 2135
.   : milestone, 2082,
iast_GLOBAL (2.13 ms) : 2077, 2183
.   : milestone, 2130,
profiling (1.946 ms) : 1904, 1988
.   : milestone, 1946,
tracing (1.931 ms) : 1891, 1971
.   : milestone, 1931,
section candidate
no_agent (1.468 ms) : 1457, 1480
.   : milestone, 1468,
appsec (2.342 ms) : 2301, 2384
.   : milestone, 2342,
iast (2.085 ms) : 2032, 2138
.   : milestone, 2085,
iast_GLOBAL (2.126 ms) : 2073, 2179
.   : milestone, 2126,
profiling (1.96 ms) : 1917, 2002
.   : milestone, 1960,
tracing (1.925 ms) : 1884, 1965
.   : milestone, 1925,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.459 ms, 1.482 ms] -
appsec 2.346 ms [2.304 ms, 2.388 ms] 875.302 µs (59.5%)
iast 2.082 ms [2.029 ms, 2.135 ms] 611.104 µs (41.6%)
iast_GLOBAL 2.13 ms [2.077 ms, 2.183 ms] 659.414 µs (44.8%)
profiling 1.946 ms [1.904 ms, 1.988 ms] 475.181 µs (32.3%)
tracing 1.931 ms [1.891 ms, 1.971 ms] 460.154 µs (31.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.468 ms [1.457 ms, 1.48 ms] -
appsec 2.342 ms [2.301 ms, 2.384 ms] 873.782 µs (59.5%)
iast 2.085 ms [2.032 ms, 2.138 ms] 616.24 µs (42.0%)
iast_GLOBAL 2.126 ms [2.073 ms, 2.179 ms] 657.851 µs (44.8%)
profiling 1.96 ms [1.917 ms, 2.002 ms] 491.114 µs (33.4%)
tracing 1.925 ms [1.884 ms, 1.965 ms] 456.143 µs (31.1%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~5259c28871, baseline=1.45.0-SNAPSHOT~c99c2c2042
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.19 s) : 15190000, 15190000
.   : milestone, 15190000,
appsec (15.145 s) : 15145000, 15145000
.   : milestone, 15145000,
iast (18.834 s) : 18834000, 18834000
.   : milestone, 18834000,
iast_GLOBAL (17.956 s) : 17956000, 17956000
.   : milestone, 17956000,
profiling (15.749 s) : 15749000, 15749000
.   : milestone, 15749000,
tracing (15.17 s) : 15170000, 15170000
.   : milestone, 15170000,
section candidate
no_agent (15.305 s) : 15305000, 15305000
.   : milestone, 15305000,
appsec (15.014 s) : 15014000, 15014000
.   : milestone, 15014000,
iast (18.743 s) : 18743000, 18743000
.   : milestone, 18743000,
iast_GLOBAL (17.989 s) : 17989000, 17989000
.   : milestone, 17989000,
profiling (15.05 s) : 15050000, 15050000
.   : milestone, 15050000,
tracing (14.858 s) : 14858000, 14858000
.   : milestone, 14858000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.19 s [15.19 s, 15.19 s] -
appsec 15.145 s [15.145 s, 15.145 s] -45.0 ms (-0.3%)
iast 18.834 s [18.834 s, 18.834 s] 3.644 s (24.0%)
iast_GLOBAL 17.956 s [17.956 s, 17.956 s] 2.766 s (18.2%)
profiling 15.749 s [15.749 s, 15.749 s] 559.0 ms (3.7%)
tracing 15.17 s [15.17 s, 15.17 s] -20.0 ms (-0.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.305 s [15.305 s, 15.305 s] -
appsec 15.014 s [15.014 s, 15.014 s] -291.0 ms (-1.9%)
iast 18.743 s [18.743 s, 18.743 s] 3.438 s (22.5%)
iast_GLOBAL 17.989 s [17.989 s, 17.989 s] 2.684 s (17.5%)
profiling 15.05 s [15.05 s, 15.05 s] -255.0 ms (-1.7%)
tracing 14.858 s [14.858 s, 14.858 s] -447.0 ms (-2.9%)

@gary-huang gary-huang force-pushed the gary/add-llmobs-configs branch 2 times, most recently from fd136e0 to ba03bdd Compare December 20, 2024 16:22
@gary-huang gary-huang force-pushed the gary/add-llmobs-configs branch from ba03bdd to a8108c6 Compare December 20, 2024 16:28
Copy link
Contributor

Hi! 👋 Looks like you updated a Git Submodule.
If this was not intentional please make sure to:

@gary-huang gary-huang marked this pull request as ready for review December 30, 2024 15:09
@gary-huang gary-huang requested a review from a team as a code owner December 30, 2024 15:09
Copy link
Contributor

github-actions bot commented Dec 30, 2024

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request
  • Remove the tag from the pull request title

If you need help, please check our contributing guidelines.

Copy link

@Yun-Kim Yun-Kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple non-blocking questions but otherwise config logic lgtm!

Comment on lines +2673 to +2678
public boolean isLlmObsAgentlessEnabled() {
return llmObsAgentlessEnabled;
}

public String getLlmObsMlApp() {
return llmObsMlApp;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these two options not set on the instrumenterConfig object? We're fine to just store this directly on the Config instance?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it is fine to store these in the config instance for now, i am not sure but it is possible we may need them, instrumenterConfig seems to be about starting actual implementations classes if a product is enabled, i think we can add them later as needed

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that's fine with me to add them later when needed. Thanks for clarifying

*/
public final class LlmObsConfig {

public static final String LLM_OBS_ENABLED = "llmobs.enabled";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit, I think the other two language SDKs use the naming pattern LLMOBS_ instead of LLM_OBS_, would be nice to stay consistent but not that serious so up to you

Copy link
Contributor

Hi! 👋 Looks like you updated a Git Submodule.
If this was not intentional please make sure to:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants