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 4 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 1735897629 1735930901
git_commit_sha a8b33d5 14f71b3
release_version 1.45.0-SNAPSHOT~a8b33d5c49 1.45.0-SNAPSHOT~14f71b3d0a
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1735933376 1735933376
ci_job_id 754309419 754309419
ci_pipeline_id 52136172 52136172
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 58 metrics, 4 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:petclinic:tracing:Remote Config better
[-50.017µs; -22.874µs] or [-6.930%; -3.169%]
685.330µs 721.776µs
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~14f71b3d0a, baseline=1.45.0-SNAPSHOT~a8b33d5c49

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.049 s) : 0, 1048661
Total [baseline] (8.629 s) : 0, 8629077
Agent [candidate] (1.055 s) : 0, 1054549
Total [candidate] (8.649 s) : 0, 8648590
section iast
Agent [baseline] (1.188 s) : 0, 1188126
Total [baseline] (9.228 s) : 0, 9227928
Agent [candidate] (1.185 s) : 0, 1185409
Total [candidate] (9.273 s) : 0, 9272948
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.18 s) : 0, 1180135
Total [baseline] (9.175 s) : 0, 9175018
Agent [candidate] (1.178 s) : 0, 1177939
Total [candidate] (9.191 s) : 0, 9191238
section iast_TELEMETRY_OFF
Agent [baseline] (1.177 s) : 0, 1176501
Total [baseline] (9.186 s) : 0, 9185889
Agent [candidate] (1.173 s) : 0, 1173245
Total [candidate] (9.22 s) : 0, 9220304
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.049 s -
Agent iast 1.188 s 139.465 ms (13.3%)
Agent iast_HARDCODED_SECRET_DISABLED 1.18 s 131.474 ms (12.5%)
Agent iast_TELEMETRY_OFF 1.177 s 127.84 ms (12.2%)
Total tracing 8.629 s -
Total iast 9.228 s 598.851 ms (6.9%)
Total iast_HARDCODED_SECRET_DISABLED 9.175 s 545.94 ms (6.3%)
Total iast_TELEMETRY_OFF 9.186 s 556.811 ms (6.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.055 s -
Agent iast 1.185 s 130.86 ms (12.4%)
Agent iast_HARDCODED_SECRET_DISABLED 1.178 s 123.39 ms (11.7%)
Agent iast_TELEMETRY_OFF 1.173 s 118.696 ms (11.3%)
Total tracing 8.649 s -
Total iast 9.273 s 624.357 ms (7.2%)
Total iast_HARDCODED_SECRET_DISABLED 9.191 s 542.648 ms (6.3%)
Total iast_TELEMETRY_OFF 9.22 s 571.714 ms (6.6%)
gantt
    title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~14f71b3d0a, baseline=1.45.0-SNAPSHOT~a8b33d5c49

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (710.239 ms) : 0, 710239
BytebuddyAgent [candidate] (712.111 ms) : 0, 712111
GlobalTracer [baseline] (255.824 ms) : 0, 255824
GlobalTracer [candidate] (256.042 ms) : 0, 256042
AppSec [baseline] (54.959 ms) : 0, 54959
AppSec [candidate] (55.788 ms) : 0, 55788
Remote Config [baseline] (711.909 µs) : 0, 712
Remote Config [candidate] (695.864 µs) : 0, 696
Telemetry [baseline] (11.96 ms) : 0, 11960
Telemetry [candidate] (14.968 ms) : 0, 14968
section iast
BytebuddyAgent [baseline] (835.36 ms) : 0, 835360
BytebuddyAgent [candidate] (833.884 ms) : 0, 833884
GlobalTracer [baseline] (247.685 ms) : 0, 247685
GlobalTracer [candidate] (247.525 ms) : 0, 247525
AppSec [baseline] (58.799 ms) : 0, 58799
AppSec [candidate] (58.298 ms) : 0, 58298
IAST [baseline] (21.722 ms) : 0, 21722
IAST [candidate] (21.454 ms) : 0, 21454
Remote Config [baseline] (665.818 µs) : 0, 666
Remote Config [candidate] (675.678 µs) : 0, 676
Telemetry [baseline] (8.757 ms) : 0, 8757
Telemetry [candidate] (8.522 ms) : 0, 8522
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (829.628 ms) : 0, 829628
BytebuddyAgent [candidate] (827.879 ms) : 0, 827879
GlobalTracer [baseline] (247.063 ms) : 0, 247063
GlobalTracer [candidate] (247.129 ms) : 0, 247129
AppSec [baseline] (58.063 ms) : 0, 58063
AppSec [candidate] (57.969 ms) : 0, 57969
IAST [baseline] (21.155 ms) : 0, 21155
IAST [candidate] (20.976 ms) : 0, 20976
Remote Config [baseline] (647.753 µs) : 0, 648
Remote Config [candidate] (640.206 µs) : 0, 640
Telemetry [baseline] (8.535 ms) : 0, 8535
Telemetry [candidate] (8.447 ms) : 0, 8447
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (826.783 ms) : 0, 826783
BytebuddyAgent [candidate] (824.67 ms) : 0, 824670
GlobalTracer [baseline] (246.632 ms) : 0, 246632
GlobalTracer [candidate] (246.185 ms) : 0, 246185
AppSec [baseline] (57.772 ms) : 0, 57772
AppSec [candidate] (57.804 ms) : 0, 57804
IAST [baseline] (21.252 ms) : 0, 21252
IAST [candidate] (20.679 ms) : 0, 20679
Remote Config [baseline] (654.501 µs) : 0, 655
Remote Config [candidate] (628.988 µs) : 0, 629
Telemetry [baseline] (8.446 ms) : 0, 8446
Telemetry [candidate] (8.319 ms) : 0, 8319
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~14f71b3d0a, baseline=1.45.0-SNAPSHOT~a8b33d5c49

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.051 s) : 0, 1050746
Total [baseline] (10.429 s) : 0, 10428812
Agent [candidate] (1.058 s) : 0, 1058319
Total [candidate] (10.379 s) : 0, 10378511
section appsec
Agent [baseline] (1.193 s) : 0, 1193301
Total [baseline] (10.692 s) : 0, 10692076
Agent [candidate] (1.192 s) : 0, 1192475
Total [candidate] (10.707 s) : 0, 10707133
section iast
Agent [baseline] (1.179 s) : 0, 1179308
Total [baseline] (11.033 s) : 0, 11032844
Agent [candidate] (1.178 s) : 0, 1177569
Total [candidate] (11.024 s) : 0, 11024348
section profiling
Agent [baseline] (1.279 s) : 0, 1279290
Total [baseline] (10.822 s) : 0, 10822077
Agent [candidate] (1.287 s) : 0, 1286773
Total [candidate] (10.841 s) : 0, 10840954
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.051 s -
Agent appsec 1.193 s 142.556 ms (13.6%)
Agent iast 1.179 s 128.562 ms (12.2%)
Agent profiling 1.279 s 228.544 ms (21.8%)
Total tracing 10.429 s -
Total appsec 10.692 s 263.263 ms (2.5%)
Total iast 11.033 s 604.032 ms (5.8%)
Total profiling 10.822 s 393.265 ms (3.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.058 s -
Agent appsec 1.192 s 134.156 ms (12.7%)
Agent iast 1.178 s 119.25 ms (11.3%)
Agent profiling 1.287 s 228.454 ms (21.6%)
Total tracing 10.379 s -
Total appsec 10.707 s 328.622 ms (3.2%)
Total iast 11.024 s 645.836 ms (6.2%)
Total profiling 10.841 s 462.443 ms (4.5%)
gantt
    title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~14f71b3d0a, baseline=1.45.0-SNAPSHOT~a8b33d5c49

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (712.604 ms) : 0, 712604
BytebuddyAgent [candidate] (716.901 ms) : 0, 716901
GlobalTracer [baseline] (256.559 ms) : 0, 256559
GlobalTracer [candidate] (256.367 ms) : 0, 256367
AppSec [baseline] (55.256 ms) : 0, 55256
AppSec [candidate] (58.303 ms) : 0, 58303
Remote Config [baseline] (721.776 µs) : 0, 722
Remote Config [candidate] (685.33 µs) : 0, 685
Telemetry [baseline] (10.629 ms) : 0, 10629
Telemetry [candidate] (11.069 ms) : 0, 11069
section appsec
BytebuddyAgent [baseline] (733.93 ms) : 0, 733930
BytebuddyAgent [candidate] (733.689 ms) : 0, 733689
GlobalTracer [baseline] (254.599 ms) : 0, 254599
GlobalTracer [candidate] (254.025 ms) : 0, 254025
AppSec [baseline] (170.609 ms) : 0, 170609
AppSec [candidate] (171.279 ms) : 0, 171279
IAST [baseline] (20.832 ms) : 0, 20832
IAST [candidate] (19.392 ms) : 0, 19392
Remote Config [baseline] (661.176 µs) : 0, 661
Remote Config [candidate] (668.505 µs) : 0, 669
Telemetry [baseline] (8.021 ms) : 0, 8021
Telemetry [candidate] (8.046 ms) : 0, 8046
section iast
BytebuddyAgent [baseline] (829.469 ms) : 0, 829469
BytebuddyAgent [candidate] (828.137 ms) : 0, 828137
GlobalTracer [baseline] (246.66 ms) : 0, 246660
GlobalTracer [candidate] (245.981 ms) : 0, 245981
AppSec [baseline] (57.814 ms) : 0, 57814
AppSec [candidate] (58.189 ms) : 0, 58189
IAST [baseline] (21.106 ms) : 0, 21106
IAST [candidate] (21.23 ms) : 0, 21230
Remote Config [baseline] (653.214 µs) : 0, 653
Remote Config [candidate] (665.579 µs) : 0, 666
Telemetry [baseline] (8.584 ms) : 0, 8584
Telemetry [candidate] (8.432 ms) : 0, 8432
section profiling
BytebuddyAgent [baseline] (704.356 ms) : 0, 704356
BytebuddyAgent [candidate] (711.129 ms) : 0, 711129
GlobalTracer [baseline] (373.466 ms) : 0, 373466
GlobalTracer [candidate] (374.412 ms) : 0, 374412
AppSec [baseline] (54.769 ms) : 0, 54769
AppSec [candidate] (54.057 ms) : 0, 54057
Remote Config [baseline] (667.1 µs) : 0, 667
Remote Config [candidate] (655.227 µs) : 0, 655
Telemetry [baseline] (7.832 ms) : 0, 7832
Telemetry [candidate] (7.799 ms) : 0, 7799
ProfilingAgent [baseline] (96.481 ms) : 0, 96481
ProfilingAgent [candidate] (96.367 ms) : 0, 96367
Profiling [baseline] (96.505 ms) : 0, 96505
Profiling [candidate] (96.392 ms) : 0, 96392
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-01-03T19:16:52 2025-01-03T19:23:53
git_branch master gary/add-llmobs-configs
git_commit_date 1735897629 1735930901
git_commit_sha a8b33d5 14f71b3
release_version 1.45.0-SNAPSHOT~a8b33d5c49 1.45.0-SNAPSHOT~14f71b3d0a
start_time 2025-01-03T19:16:38 2025-01-03T19:23:39
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1735932589 1735932589
ci_job_id 754309420 754309420
ci_pipeline_id 52136172 52136172
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 13 metrics, 15 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~14f71b3d0a, baseline=1.45.0-SNAPSHOT~a8b33d5c49
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.35 ms) : 1330, 1370
.   : milestone, 1350,
appsec (1.753 ms) : 1730, 1776
.   : milestone, 1753,
appsec_no_iast (1.767 ms) : 1744, 1790
.   : milestone, 1767,
iast (1.507 ms) : 1484, 1530
.   : milestone, 1507,
profiling (1.538 ms) : 1513, 1563
.   : milestone, 1538,
tracing (1.494 ms) : 1469, 1519
.   : milestone, 1494,
section candidate
no_agent (1.368 ms) : 1349, 1388
.   : milestone, 1368,
appsec (1.755 ms) : 1731, 1779
.   : milestone, 1755,
appsec_no_iast (1.76 ms) : 1735, 1785
.   : milestone, 1760,
iast (1.515 ms) : 1491, 1539
.   : milestone, 1515,
profiling (1.577 ms) : 1553, 1602
.   : milestone, 1577,
tracing (1.508 ms) : 1483, 1533
.   : milestone, 1508,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.35 ms [1.33 ms, 1.37 ms] -
appsec 1.753 ms [1.73 ms, 1.776 ms] 402.996 µs (29.9%)
appsec_no_iast 1.767 ms [1.744 ms, 1.79 ms] 416.942 µs (30.9%)
iast 1.507 ms [1.484 ms, 1.53 ms] 157.311 µs (11.7%)
profiling 1.538 ms [1.513 ms, 1.563 ms] 188.267 µs (13.9%)
tracing 1.494 ms [1.469 ms, 1.519 ms] 144.348 µs (10.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.368 ms [1.349 ms, 1.388 ms] -
appsec 1.755 ms [1.731 ms, 1.779 ms] 386.335 µs (28.2%)
appsec_no_iast 1.76 ms [1.735 ms, 1.785 ms] 391.51 µs (28.6%)
iast 1.515 ms [1.491 ms, 1.539 ms] 146.308 µs (10.7%)
profiling 1.577 ms [1.553 ms, 1.602 ms] 208.991 µs (15.3%)
tracing 1.508 ms [1.483 ms, 1.533 ms] 139.369 µs (10.2%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~14f71b3d0a, baseline=1.45.0-SNAPSHOT~a8b33d5c49
    dateFormat X
    axisFormat %s
section baseline
no_agent (383.589 µs) : 364, 403
.   : milestone, 384,
iast (507.009 µs) : 485, 529
.   : milestone, 507,
iast_FULL (662.982 µs) : 641, 685
.   : milestone, 663,
iast_GLOBAL (535.646 µs) : 513, 559
.   : milestone, 536,
iast_HARDCODED_SECRET_DISABLED (498.57 µs) : 477, 520
.   : milestone, 499,
iast_INACTIVE (458.861 µs) : 438, 480
.   : milestone, 459,
iast_TELEMETRY_OFF (496.44 µs) : 475, 518
.   : milestone, 496,
tracing (470.52 µs) : 450, 491
.   : milestone, 471,
section candidate
no_agent (373.43 µs) : 354, 393
.   : milestone, 373,
iast (504.459 µs) : 483, 526
.   : milestone, 504,
iast_FULL (665.148 µs) : 643, 687
.   : milestone, 665,
iast_GLOBAL (524.711 µs) : 503, 547
.   : milestone, 525,
iast_HARDCODED_SECRET_DISABLED (499.097 µs) : 477, 521
.   : milestone, 499,
iast_INACTIVE (463.531 µs) : 442, 485
.   : milestone, 464,
iast_TELEMETRY_OFF (490.245 µs) : 468, 512
.   : milestone, 490,
tracing (460.425 µs) : 439, 482
.   : milestone, 460,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 383.589 µs [363.89 µs, 403.289 µs] -
iast 507.009 µs [485.369 µs, 528.649 µs] 123.42 µs (32.2%)
iast_FULL 662.982 µs [641.421 µs, 684.543 µs] 279.393 µs (72.8%)
iast_GLOBAL 535.646 µs [512.736 µs, 558.557 µs] 152.057 µs (39.6%)
iast_HARDCODED_SECRET_DISABLED 498.57 µs [476.815 µs, 520.326 µs] 114.981 µs (30.0%)
iast_INACTIVE 458.861 µs [438.031 µs, 479.691 µs] 75.272 µs (19.6%)
iast_TELEMETRY_OFF 496.44 µs [474.731 µs, 518.149 µs] 112.851 µs (29.4%)
tracing 470.52 µs [449.566 µs, 491.473 µs] 86.931 µs (22.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 373.43 µs [353.71 µs, 393.15 µs] -
iast 504.459 µs [482.633 µs, 526.285 µs] 131.029 µs (35.1%)
iast_FULL 665.148 µs [643.412 µs, 686.884 µs] 291.718 µs (78.1%)
iast_GLOBAL 524.711 µs [502.79 µs, 546.631 µs] 151.281 µs (40.5%)
iast_HARDCODED_SECRET_DISABLED 499.097 µs [477.261 µs, 520.933 µs] 125.667 µs (33.7%)
iast_INACTIVE 463.531 µs [441.868 µs, 485.194 µs] 90.101 µs (24.1%)
iast_TELEMETRY_OFF 490.245 µs [468.343 µs, 512.146 µs] 116.815 µs (31.3%)
tracing 460.425 µs [438.957 µs, 481.894 µs] 86.995 µs (23.3%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master gary/add-llmobs-configs
git_commit_date 1735897629 1735930901
git_commit_sha a8b33d5 14f71b3
release_version 1.45.0-SNAPSHOT~a8b33d5c49 1.45.0-SNAPSHOT~14f71b3d0a
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1735932938 1735932938
ci_job_id 754309421 754309421
ci_pipeline_id 52136172 52136172
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 biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~14f71b3d0a, baseline=1.45.0-SNAPSHOT~a8b33d5c49
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.922 s) : 14922000, 14922000
.   : milestone, 14922000,
appsec (15.195 s) : 15195000, 15195000
.   : milestone, 15195000,
iast (18.929 s) : 18929000, 18929000
.   : milestone, 18929000,
iast_GLOBAL (17.833 s) : 17833000, 17833000
.   : milestone, 17833000,
profiling (15.547 s) : 15547000, 15547000
.   : milestone, 15547000,
tracing (15.142 s) : 15142000, 15142000
.   : milestone, 15142000,
section candidate
no_agent (15.586 s) : 15586000, 15586000
.   : milestone, 15586000,
appsec (15.096 s) : 15096000, 15096000
.   : milestone, 15096000,
iast (19.049 s) : 19049000, 19049000
.   : milestone, 19049000,
iast_GLOBAL (17.676 s) : 17676000, 17676000
.   : milestone, 17676000,
profiling (14.995 s) : 14995000, 14995000
.   : milestone, 14995000,
tracing (14.91 s) : 14910000, 14910000
.   : milestone, 14910000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.922 s [14.922 s, 14.922 s] -
appsec 15.195 s [15.195 s, 15.195 s] 273.0 ms (1.8%)
iast 18.929 s [18.929 s, 18.929 s] 4.007 s (26.9%)
iast_GLOBAL 17.833 s [17.833 s, 17.833 s] 2.911 s (19.5%)
profiling 15.547 s [15.547 s, 15.547 s] 625.0 ms (4.2%)
tracing 15.142 s [15.142 s, 15.142 s] 220.0 ms (1.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.586 s [15.586 s, 15.586 s] -
appsec 15.096 s [15.096 s, 15.096 s] -490.0 ms (-3.1%)
iast 19.049 s [19.049 s, 19.049 s] 3.463 s (22.2%)
iast_GLOBAL 17.676 s [17.676 s, 17.676 s] 2.09 s (13.4%)
profiling 14.995 s [14.995 s, 14.995 s] -591.0 ms (-3.8%)
tracing 14.91 s [14.91 s, 14.91 s] -676.0 ms (-4.3%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~14f71b3d0a, baseline=1.45.0-SNAPSHOT~a8b33d5c49
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.481 ms) : 1470, 1493
.   : milestone, 1481,
appsec (2.367 ms) : 2325, 2409
.   : milestone, 2367,
iast (2.109 ms) : 2056, 2162
.   : milestone, 2109,
iast_GLOBAL (2.138 ms) : 2085, 2192
.   : milestone, 2138,
profiling (1.967 ms) : 1925, 2009
.   : milestone, 1967,
tracing (1.939 ms) : 1898, 1980
.   : milestone, 1939,
section candidate
no_agent (1.474 ms) : 1463, 1486
.   : milestone, 1474,
appsec (2.345 ms) : 2304, 2386
.   : milestone, 2345,
iast (2.091 ms) : 2038, 2144
.   : milestone, 2091,
iast_GLOBAL (2.152 ms) : 2099, 2206
.   : milestone, 2152,
profiling (1.966 ms) : 1924, 2008
.   : milestone, 1966,
tracing (1.938 ms) : 1897, 1979
.   : milestone, 1938,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.481 ms [1.47 ms, 1.493 ms] -
appsec 2.367 ms [2.325 ms, 2.409 ms] 885.717 µs (59.8%)
iast 2.109 ms [2.056 ms, 2.162 ms] 627.732 µs (42.4%)
iast_GLOBAL 2.138 ms [2.085 ms, 2.192 ms] 656.997 µs (44.4%)
profiling 1.967 ms [1.925 ms, 2.009 ms] 485.682 µs (32.8%)
tracing 1.939 ms [1.898 ms, 1.98 ms] 457.781 µs (30.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.474 ms [1.463 ms, 1.486 ms] -
appsec 2.345 ms [2.304 ms, 2.386 ms] 870.746 µs (59.1%)
iast 2.091 ms [2.038 ms, 2.144 ms] 617.002 µs (41.9%)
iast_GLOBAL 2.152 ms [2.099 ms, 2.206 ms] 678.161 µs (46.0%)
profiling 1.966 ms [1.924 ms, 2.008 ms] 491.982 µs (33.4%)
tracing 1.938 ms [1.897 ms, 1.979 ms] 463.801 µs (31.5%)

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

  • 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:

@PerfectSlayer PerfectSlayer added the comp: llm obs LLM Observibility label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: llm obs LLM Observibility tag: experimental Experimental changes type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants