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 3 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 1735830355 1735843990
git_commit_sha 1951e6f 36b653b
release_version 1.45.0-SNAPSHOT~1951e6f72e 1.45.0-SNAPSHOT~36b653bf75
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1735846390 1735846390
ci_job_id 753011751 753011751
ci_pipeline_id 52042163 52042163
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 1 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 3 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:tracing:Remote Config better
[-47.105µs; -23.018µs] or [-6.549%; -3.200%]
684.183µs 719.245µs
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~36b653bf75, baseline=1.45.0-SNAPSHOT~1951e6f72e

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.05 s) : 0, 1049679
Total [baseline] (10.437 s) : 0, 10436757
Agent [candidate] (1.059 s) : 0, 1058669
Total [candidate] (10.492 s) : 0, 10491736
section appsec
Agent [baseline] (1.19 s) : 0, 1189860
Total [baseline] (10.759 s) : 0, 10758581
Agent [candidate] (1.187 s) : 0, 1187093
Total [candidate] (10.706 s) : 0, 10706181
section iast
Agent [baseline] (1.182 s) : 0, 1182248
Total [baseline] (10.982 s) : 0, 10981548
Agent [candidate] (1.18 s) : 0, 1179970
Total [candidate] (11.005 s) : 0, 11005097
section profiling
Agent [baseline] (1.272 s) : 0, 1272405
Total [baseline] (10.806 s) : 0, 10806199
Agent [candidate] (1.279 s) : 0, 1278884
Total [candidate] (10.872 s) : 0, 10871956
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.05 s -
Agent appsec 1.19 s 140.181 ms (13.4%)
Agent iast 1.182 s 132.568 ms (12.6%)
Agent profiling 1.272 s 222.726 ms (21.2%)
Total tracing 10.437 s -
Total appsec 10.759 s 321.823 ms (3.1%)
Total iast 10.982 s 544.791 ms (5.2%)
Total profiling 10.806 s 369.442 ms (3.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent appsec 1.187 s 128.424 ms (12.1%)
Agent iast 1.18 s 121.301 ms (11.5%)
Agent profiling 1.279 s 220.216 ms (20.8%)
Total tracing 10.492 s -
Total appsec 10.706 s 214.446 ms (2.0%)
Total iast 11.005 s 513.361 ms (4.9%)
Total profiling 10.872 s 380.22 ms (3.6%)
gantt
    title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~36b653bf75, baseline=1.45.0-SNAPSHOT~1951e6f72e

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (711.574 ms) : 0, 711574
BytebuddyAgent [candidate] (716.686 ms) : 0, 716686
GlobalTracer [baseline] (256.238 ms) : 0, 256238
GlobalTracer [candidate] (256.084 ms) : 0, 256084
AppSec [baseline] (54.935 ms) : 0, 54935
AppSec [candidate] (57.647 ms) : 0, 57647
Remote Config [baseline] (716.676 µs) : 0, 717
Remote Config [candidate] (690.713 µs) : 0, 691
Telemetry [baseline] (11.195 ms) : 0, 11195
Telemetry [candidate] (12.533 ms) : 0, 12533
section appsec
BytebuddyAgent [baseline] (731.755 ms) : 0, 731755
BytebuddyAgent [candidate] (728.969 ms) : 0, 728969
GlobalTracer [baseline] (254.058 ms) : 0, 254058
GlobalTracer [candidate] (252.992 ms) : 0, 252992
AppSec [baseline] (170.665 ms) : 0, 170665
AppSec [candidate] (171.762 ms) : 0, 171762
Remote Config [baseline] (661.998 µs) : 0, 662
Remote Config [candidate] (660.919 µs) : 0, 661
Telemetry [baseline] (8.051 ms) : 0, 8051
Telemetry [candidate] (7.991 ms) : 0, 7991
IAST [baseline] (19.317 ms) : 0, 19317
IAST [candidate] (19.628 ms) : 0, 19628
section iast
BytebuddyAgent [baseline] (831.416 ms) : 0, 831416
BytebuddyAgent [candidate] (831.425 ms) : 0, 831425
GlobalTracer [baseline] (247.215 ms) : 0, 247215
GlobalTracer [candidate] (245.954 ms) : 0, 245954
AppSec [baseline] (58.06 ms) : 0, 58060
AppSec [candidate] (57.568 ms) : 0, 57568
Remote Config [baseline] (648.762 µs) : 0, 649
Remote Config [candidate] (650.09 µs) : 0, 650
Telemetry [baseline] (8.544 ms) : 0, 8544
Telemetry [candidate] (8.422 ms) : 0, 8422
IAST [baseline] (21.331 ms) : 0, 21331
IAST [candidate] (20.969 ms) : 0, 20969
section profiling
ProfilingAgent [baseline] (95.793 ms) : 0, 95793
ProfilingAgent [candidate] (96.427 ms) : 0, 96427
BytebuddyAgent [baseline] (701.831 ms) : 0, 701831
BytebuddyAgent [candidate] (704.768 ms) : 0, 704768
GlobalTracer [baseline] (370.656 ms) : 0, 370656
GlobalTracer [candidate] (373.056 ms) : 0, 373056
AppSec [baseline] (54.021 ms) : 0, 54021
AppSec [candidate] (54.065 ms) : 0, 54065
Remote Config [baseline] (651.572 µs) : 0, 652
Remote Config [candidate] (657.587 µs) : 0, 658
Telemetry [baseline] (7.779 ms) : 0, 7779
Telemetry [candidate] (7.963 ms) : 0, 7963
Profiling [baseline] (95.821 ms) : 0, 95821
Profiling [candidate] (96.455 ms) : 0, 96455
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~36b653bf75, baseline=1.45.0-SNAPSHOT~1951e6f72e

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1055597
Total [baseline] (8.599 s) : 0, 8599217
Agent [candidate] (1.051 s) : 0, 1051236
Total [candidate] (8.593 s) : 0, 8592595
section iast
Agent [baseline] (1.18 s) : 0, 1180451
Total [baseline] (9.198 s) : 0, 9197859
Agent [candidate] (1.179 s) : 0, 1179407
Total [candidate] (9.253 s) : 0, 9253319
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.18 s) : 0, 1179981
Total [baseline] (9.144 s) : 0, 9143985
Agent [candidate] (1.175 s) : 0, 1175057
Total [candidate] (9.15 s) : 0, 9149626
section iast_TELEMETRY_OFF
Agent [baseline] (1.182 s) : 0, 1182012
Total [baseline] (9.17 s) : 0, 9169865
Agent [candidate] (1.174 s) : 0, 1173637
Total [candidate] (9.178 s) : 0, 9177920
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent iast 1.18 s 124.854 ms (11.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.18 s 124.384 ms (11.8%)
Agent iast_TELEMETRY_OFF 1.182 s 126.415 ms (12.0%)
Total tracing 8.599 s -
Total iast 9.198 s 598.642 ms (7.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.144 s 544.767 ms (6.3%)
Total iast_TELEMETRY_OFF 9.17 s 570.647 ms (6.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.051 s -
Agent iast 1.179 s 128.171 ms (12.2%)
Agent iast_HARDCODED_SECRET_DISABLED 1.175 s 123.821 ms (11.8%)
Agent iast_TELEMETRY_OFF 1.174 s 122.401 ms (11.6%)
Total tracing 8.593 s -
Total iast 9.253 s 660.724 ms (7.7%)
Total iast_HARDCODED_SECRET_DISABLED 9.15 s 557.031 ms (6.5%)
Total iast_TELEMETRY_OFF 9.178 s 585.325 ms (6.8%)
gantt
    title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~36b653bf75, baseline=1.45.0-SNAPSHOT~1951e6f72e

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.92 ms) : 0, 713920
BytebuddyAgent [candidate] (709.806 ms) : 0, 709806
GlobalTracer [baseline] (257.119 ms) : 0, 257119
GlobalTracer [candidate] (255.865 ms) : 0, 255865
AppSec [baseline] (55.221 ms) : 0, 55221
AppSec [candidate] (56.572 ms) : 0, 56572
Remote Config [baseline] (719.245 µs) : 0, 719
Remote Config [candidate] (684.183 µs) : 0, 684
Telemetry [baseline] (13.595 ms) : 0, 13595
Telemetry [candidate] (13.384 ms) : 0, 13384
section iast
BytebuddyAgent [baseline] (830.082 ms) : 0, 830082
BytebuddyAgent [candidate] (829.321 ms) : 0, 829321
GlobalTracer [baseline] (246.624 ms) : 0, 246624
GlobalTracer [candidate] (246.626 ms) : 0, 246626
AppSec [baseline] (58.183 ms) : 0, 58183
AppSec [candidate] (57.916 ms) : 0, 57916
IAST [baseline] (21.335 ms) : 0, 21335
IAST [candidate] (21.407 ms) : 0, 21407
Remote Config [baseline] (640.559 µs) : 0, 641
Remote Config [candidate] (657.698 µs) : 0, 658
Telemetry [baseline] (8.597 ms) : 0, 8597
Telemetry [candidate] (8.498 ms) : 0, 8498
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (829.687 ms) : 0, 829687
BytebuddyAgent [candidate] (826.311 ms) : 0, 826311
GlobalTracer [baseline] (246.772 ms) : 0, 246772
GlobalTracer [candidate] (246.134 ms) : 0, 246134
AppSec [baseline] (58.145 ms) : 0, 58145
AppSec [candidate] (57.496 ms) : 0, 57496
IAST [baseline] (21.221 ms) : 0, 21221
IAST [candidate] (21.019 ms) : 0, 21019
Remote Config [baseline] (666.876 µs) : 0, 667
Remote Config [candidate] (645.178 µs) : 0, 645
Telemetry [baseline] (8.505 ms) : 0, 8505
Telemetry [candidate] (8.578 ms) : 0, 8578
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (831.14 ms) : 0, 831140
BytebuddyAgent [candidate] (824.913 ms) : 0, 824913
GlobalTracer [baseline] (247.874 ms) : 0, 247874
GlobalTracer [candidate] (246.383 ms) : 0, 246383
AppSec [baseline] (57.984 ms) : 0, 57984
AppSec [candidate] (57.629 ms) : 0, 57629
IAST [baseline] (20.917 ms) : 0, 20917
IAST [candidate] (20.742 ms) : 0, 20742
Remote Config [baseline] (640.189 µs) : 0, 640
Remote Config [candidate] (654.513 µs) : 0, 655
Telemetry [baseline] (8.468 ms) : 0, 8468
Telemetry [candidate] (8.398 ms) : 0, 8398
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-01-02T19:03:31 2025-01-02T19:10:31
git_branch master gary/add-llmobs-configs
git_commit_date 1735830355 1735843990
git_commit_sha 1951e6f 36b653b
release_version 1.45.0-SNAPSHOT~1951e6f72e 1.45.0-SNAPSHOT~36b653bf75
start_time 2025-01-02T19:03:17 2025-01-02T19:10:17
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1735845384 1735845384
ci_job_id 753011752 753011752
ci_pipeline_id 52042163 52042163
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 insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~36b653bf75, baseline=1.45.0-SNAPSHOT~1951e6f72e
    dateFormat X
    axisFormat %s
section baseline
no_agent (374.373 µs) : 354, 394
.   : milestone, 374,
iast (496.536 µs) : 475, 518
.   : milestone, 497,
iast_FULL (657.313 µs) : 636, 679
.   : milestone, 657,
iast_GLOBAL (523.809 µs) : 502, 546
.   : milestone, 524,
iast_HARDCODED_SECRET_DISABLED (492.827 µs) : 472, 514
.   : milestone, 493,
iast_INACTIVE (456.102 µs) : 435, 477
.   : milestone, 456,
iast_TELEMETRY_OFF (480.631 µs) : 459, 502
.   : milestone, 481,
tracing (452.635 µs) : 431, 474
.   : milestone, 453,
section candidate
no_agent (376.052 µs) : 356, 396
.   : milestone, 376,
iast (490.129 µs) : 469, 512
.   : milestone, 490,
iast_FULL (652.589 µs) : 631, 674
.   : milestone, 653,
iast_GLOBAL (534.871 µs) : 511, 558
.   : milestone, 535,
iast_HARDCODED_SECRET_DISABLED (496.304 µs) : 474, 518
.   : milestone, 496,
iast_INACTIVE (454.122 µs) : 433, 475
.   : milestone, 454,
iast_TELEMETRY_OFF (486.157 µs) : 464, 508
.   : milestone, 486,
tracing (450.614 µs) : 429, 472
.   : milestone, 451,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 374.373 µs [354.303 µs, 394.442 µs] -
iast 496.536 µs [474.914 µs, 518.159 µs] 122.164 µs (32.6%)
iast_FULL 657.313 µs [635.786 µs, 678.84 µs] 282.94 µs (75.6%)
iast_GLOBAL 523.809 µs [501.677 µs, 545.941 µs] 149.437 µs (39.9%)
iast_HARDCODED_SECRET_DISABLED 492.827 µs [471.635 µs, 514.02 µs] 118.455 µs (31.6%)
iast_INACTIVE 456.102 µs [434.813 µs, 477.391 µs] 81.729 µs (21.8%)
iast_TELEMETRY_OFF 480.631 µs [459.486 µs, 501.777 µs] 106.259 µs (28.4%)
tracing 452.635 µs [431.252 µs, 474.018 µs] 78.262 µs (20.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 376.052 µs [355.876 µs, 396.227 µs] -
iast 490.129 µs [468.733 µs, 511.526 µs] 114.078 µs (30.3%)
iast_FULL 652.589 µs [631.009 µs, 674.169 µs] 276.537 µs (73.5%)
iast_GLOBAL 534.871 µs [511.491 µs, 558.252 µs] 158.819 µs (42.2%)
iast_HARDCODED_SECRET_DISABLED 496.304 µs [474.405 µs, 518.203 µs] 120.252 µs (32.0%)
iast_INACTIVE 454.122 µs [432.815 µs, 475.428 µs] 78.07 µs (20.8%)
iast_TELEMETRY_OFF 486.157 µs [464.265 µs, 508.048 µs] 110.105 µs (29.3%)
tracing 450.614 µs [429.176 µs, 472.053 µs] 74.562 µs (19.8%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~36b653bf75, baseline=1.45.0-SNAPSHOT~1951e6f72e
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.347 ms) : 1327, 1366
.   : milestone, 1347,
appsec (1.744 ms) : 1720, 1768
.   : milestone, 1744,
appsec_no_iast (1.753 ms) : 1729, 1777
.   : milestone, 1753,
iast (1.523 ms) : 1500, 1545
.   : milestone, 1523,
profiling (1.519 ms) : 1496, 1542
.   : milestone, 1519,
tracing (1.497 ms) : 1472, 1522
.   : milestone, 1497,
section candidate
no_agent (1.365 ms) : 1344, 1386
.   : milestone, 1365,
appsec (1.754 ms) : 1729, 1778
.   : milestone, 1754,
appsec_no_iast (1.757 ms) : 1732, 1783
.   : milestone, 1757,
iast (1.485 ms) : 1461, 1508
.   : milestone, 1485,
profiling (1.502 ms) : 1478, 1525
.   : milestone, 1502,
tracing (1.471 ms) : 1446, 1496
.   : milestone, 1471,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.347 ms [1.327 ms, 1.366 ms] -
appsec 1.744 ms [1.72 ms, 1.768 ms] 397.525 µs (29.5%)
appsec_no_iast 1.753 ms [1.729 ms, 1.777 ms] 406.101 µs (30.2%)
iast 1.523 ms [1.5 ms, 1.545 ms] 175.943 µs (13.1%)
profiling 1.519 ms [1.496 ms, 1.542 ms] 172.348 µs (12.8%)
tracing 1.497 ms [1.472 ms, 1.522 ms] 149.899 µs (11.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.365 ms [1.344 ms, 1.386 ms] -
appsec 1.754 ms [1.729 ms, 1.778 ms] 388.765 µs (28.5%)
appsec_no_iast 1.757 ms [1.732 ms, 1.783 ms] 392.595 µs (28.8%)
iast 1.485 ms [1.461 ms, 1.508 ms] 119.731 µs (8.8%)
profiling 1.502 ms [1.478 ms, 1.525 ms] 136.7 µs (10.0%)
tracing 1.471 ms [1.446 ms, 1.496 ms] 106.567 µs (7.8%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master gary/add-llmobs-configs
git_commit_date 1735830355 1735843990
git_commit_sha 1951e6f 36b653b
release_version 1.45.0-SNAPSHOT~1951e6f72e 1.45.0-SNAPSHOT~36b653bf75
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1735845940 1735845940
ci_job_id 753011753 753011753
ci_pipeline_id 52042163 52042163
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~36b653bf75, baseline=1.45.0-SNAPSHOT~1951e6f72e
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.46 ms) : 1449, 1472
.   : milestone, 1460,
appsec (2.34 ms) : 2298, 2382
.   : milestone, 2340,
iast (2.08 ms) : 2027, 2133
.   : milestone, 2080,
iast_GLOBAL (2.124 ms) : 2071, 2178
.   : milestone, 2124,
profiling (1.947 ms) : 1905, 1990
.   : milestone, 1947,
tracing (1.92 ms) : 1880, 1961
.   : milestone, 1920,
section candidate
no_agent (1.465 ms) : 1453, 1476
.   : milestone, 1465,
appsec (2.33 ms) : 2289, 2372
.   : milestone, 2330,
iast (2.072 ms) : 2020, 2125
.   : milestone, 2072,
iast_GLOBAL (2.126 ms) : 2073, 2179
.   : milestone, 2126,
profiling (1.968 ms) : 1925, 2011
.   : milestone, 1968,
tracing (1.928 ms) : 1888, 1969
.   : milestone, 1928,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.46 ms [1.449 ms, 1.472 ms] -
appsec 2.34 ms [2.298 ms, 2.382 ms] 879.09 µs (60.2%)
iast 2.08 ms [2.027 ms, 2.133 ms] 619.609 µs (42.4%)
iast_GLOBAL 2.124 ms [2.071 ms, 2.178 ms] 663.907 µs (45.5%)
profiling 1.947 ms [1.905 ms, 1.99 ms] 486.615 µs (33.3%)
tracing 1.92 ms [1.88 ms, 1.961 ms] 459.769 µs (31.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.465 ms [1.453 ms, 1.476 ms] -
appsec 2.33 ms [2.289 ms, 2.372 ms] 865.425 µs (59.1%)
iast 2.072 ms [2.02 ms, 2.125 ms] 607.528 µs (41.5%)
iast_GLOBAL 2.126 ms [2.073 ms, 2.179 ms] 660.815 µs (45.1%)
profiling 1.968 ms [1.925 ms, 2.011 ms] 503.082 µs (34.3%)
tracing 1.928 ms [1.888 ms, 1.969 ms] 463.468 µs (31.6%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~36b653bf75, baseline=1.45.0-SNAPSHOT~1951e6f72e
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.0 s) : 15000000, 15000000
.   : milestone, 15000000,
appsec (15.04 s) : 15040000, 15040000
.   : milestone, 15040000,
iast (18.834 s) : 18834000, 18834000
.   : milestone, 18834000,
iast_GLOBAL (17.801 s) : 17801000, 17801000
.   : milestone, 17801000,
profiling (15.781 s) : 15781000, 15781000
.   : milestone, 15781000,
tracing (15.171 s) : 15171000, 15171000
.   : milestone, 15171000,
section candidate
no_agent (15.569 s) : 15569000, 15569000
.   : milestone, 15569000,
appsec (15.009 s) : 15009000, 15009000
.   : milestone, 15009000,
iast (18.789 s) : 18789000, 18789000
.   : milestone, 18789000,
iast_GLOBAL (17.985 s) : 17985000, 17985000
.   : milestone, 17985000,
profiling (14.852 s) : 14852000, 14852000
.   : milestone, 14852000,
tracing (14.769 s) : 14769000, 14769000
.   : milestone, 14769000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.0 s [15.0 s, 15.0 s] -
appsec 15.04 s [15.04 s, 15.04 s] 40.0 ms (0.3%)
iast 18.834 s [18.834 s, 18.834 s] 3.834 s (25.6%)
iast_GLOBAL 17.801 s [17.801 s, 17.801 s] 2.801 s (18.7%)
profiling 15.781 s [15.781 s, 15.781 s] 781.0 ms (5.2%)
tracing 15.171 s [15.171 s, 15.171 s] 171.0 ms (1.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.569 s [15.569 s, 15.569 s] -
appsec 15.009 s [15.009 s, 15.009 s] -560.0 ms (-3.6%)
iast 18.789 s [18.789 s, 18.789 s] 3.22 s (20.7%)
iast_GLOBAL 17.985 s [17.985 s, 17.985 s] 2.416 s (15.5%)
profiling 14.852 s [14.852 s, 14.852 s] -717.0 ms (-4.6%)
tracing 14.769 s [14.769 s, 14.769 s] -800.0 ms (-5.1%)

@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 Author

Choose a reason for hiding this comment

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

yes for sure, good catch!

Copy link
Contributor

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

Copy link
Contributor

github-actions bot commented Jan 2, 2025

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