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

OtlpJsonLoggingSpanExporter doesn't respect the File Exporter format #6749

Closed
joffrey-bion opened this issue Sep 26, 2024 · 8 comments
Closed
Labels
Bug Something isn't working

Comments

@joffrey-bion
Copy link

joffrey-bion commented Sep 26, 2024

Describe the bug

The log files produced by OtlpJsonLoggingSpanExporter contain JSON lines, but each line is missing the { "resourceSpans": [ ... ] } wrapper described here:
https://opentelemetry.io/docs/specs/otel/protocol/file-exporter/#examples

Steps to reproduce

Use this kind of configuration:

val tracerProvider = SdkTracerProvider.builder()
    .addSpanProcessor(BatchSpanProcessor.builder(OtlpJsonLoggingSpanExporter.create()).build())
    .setResource(resource)
    .build()
val openTelemetry = OpenTelemetrySdk.builder()
    .setTracerProvider(tracerProvider)
    .build()
GlobalOpenTelemetry.set(openTelemetry)

// Configure the output log file
val otlpLogger = Logger.getLogger(OtlpJsonLoggingSpanExporter::class.java.getName())
val spansFile = amperBuildLogsRoot.path.resolve("opentelemetry_traces.jsonl")
val fileHandler = FileHandler(spansFile.pathString, true) // true to append, false to overwrite
fileHandler.formatter = MessageOnlyFormatter
otlpLogger.addHandler(fileHandler)
otlpLogger.level = Level.ALL

// A simple formatter to avoid the usual logging makeup in the file and keep the pure JSON lines output
private object MessageOnlyFormatter : Formatter() {
    override fun format(record: LogRecord?): String = formatMessage(record) + "\n"
}

And check the output files after producing some spans.

What did you expect to see?

A file that looks like the examples in the specification:

{"resourceSpans":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeSpans":[{"scope":{},"spans":[{"traceId":"","spanId":"","parentSpanId":"","name":"operationA","startTimeUnixNano":"1581452772000000321","endTimeUnixNano":"1581452773000000789","droppedAttributesCount":1,"events":[{"timeUnixNano":"1581452773000000123","name":"event-with-attr","attributes":[{"key":"span-event-attr","value":{"stringValue":"span-event-attr-val"}}],"droppedAttributesCount":2},{"timeUnixNano":"1581452773000000123","name":"event","droppedAttributesCount":2}],"droppedEventsCount":1,"status":{"message":"status-cancelled","code":2}},{"traceId":"","spanId":"","parentSpanId":"","name":"operationB","startTimeUnixNano":"1581452772000000321","endTimeUnixNano":"1581452773000000789","links":[{"traceId":"","spanId":"","attributes":[{"key":"span-link-attr","value":{"stringValue":"span-link-attr-val"}}],"droppedAttributesCount":4},{"traceId":"","spanId":"","droppedAttributesCount":1}],"droppedLinksCount":3,"status":{}}]}]}]}
{"resourceSpans":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeSpans":[{"scope":{},"spans":[{"traceId":"","spanId":"","parentSpanId":"","name":"operationA","startTimeUnixNano":"1581452772000000321","endTimeUnixNano":"1581452773000000789","droppedAttributesCount":1,"events":[{"timeUnixNano":"1581452773000000424","name":"event-with-attr","attributes":[{"key":"span-event-attr","value":{"stringValue":"span-event-attr-val"}}],"droppedAttributesCount":2},{"timeUnixNano":"1581452773000000424","name":"event","droppedAttributesCount":2}],"droppedEventsCount":1,"status":{"message":"status-cancelled","code":2}},{"traceId":"","spanId":"","parentSpanId":"","name":"operationB","startTimeUnixNano":"1581452772000000343","endTimeUnixNano":"1581452773000001089","links":[{"traceId":"","spanId":"","attributes":[{"key":"span-link-attr","value":{"stringValue":"span-link-attr-val"}}],"droppedAttributesCount":3},{"traceId":"","spanId":"","droppedAttributesCount":4}],"droppedLinksCount":2,"status":{}}]}]}]}
{"resourceSpans":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeSpans":[{"scope":{},"spans":[{"traceId":"","spanId":"","parentSpanId":"","name":"operationA","startTimeUnixNano":"1581452772000000321","endTimeUnixNano":"1581452773000000789","droppedAttributesCount":1,"events":[{"timeUnixNano":"1581452773000000826","name":"event-with-attr","attributes":[{"key":"span-event-attr","value":{"stringValue":"span-event-attr-val"}}],"droppedAttributesCount":2},{"timeUnixNano":"1581452773000000826","name":"event","droppedAttributesCount":2}],"droppedEventsCount":1,"status":{"message":"status-cancelled","code":2}},{"traceId":"","spanId":"","parentSpanId":"","name":"operationB","startTimeUnixNano":"1581452772000200521","endTimeUnixNano":"1581452773000004789","links":[{"traceId":"","spanId":"","attributes":[{"key":"span-link-attr","value":{"stringValue":"span-link-attr-val"}}],"droppedAttributesCount":5},{"traceId":"","spanId":"","droppedAttributesCount":2}],"droppedLinksCount":3,"status":{}}]}]}]}
{"resourceSpans":[{"resource":{"attributes":[{"key":"resource-attr","value":{"stringValue":"resource-attr-val-1"}}]},"scopeSpans":[{"scope":{},"spans":[{"traceId":"","spanId":"","parentSpanId":"","name":"operationA","startTimeUnixNano":"1581452772000000321","endTimeUnixNano":"1581452773000000789","droppedAttributesCount":1,"events":[{"timeUnixNano":"1581452773000010925","name":"event-with-attr","attributes":[{"key":"span-event-attr","value":{"stringValue":"span-event-attr-val"}}],"droppedAttributesCount":2},{"timeUnixNano":"1581452773000010925","name":"event","droppedAttributesCount":2}],"droppedEventsCount":1,"status":{"message":"status-cancelled","code":2}},{"traceId":"","spanId":"","parentSpanId":"","name":"operationB","startTimeUnixNano":"1581452772000011821","endTimeUnixNano":"1581452772000012924","links":[{"traceId":"","spanId":"","attributes":[{"key":"span-link-attr","value":{"stringValue":"span-link-attr-val"}}],"droppedAttributesCount":2},{"traceId":"","spanId":"","droppedAttributesCount":2}],"droppedLinksCount":5,"status":{}}]}]}]}

What did you see instead?

A file containing directly the object with the "resource" key on each line:

{"resource":{"attributes":[{"key":"host.arch","value":{"stringValue":"amd64"}},{"key":"os.type","value":{"stringValue":"Windows 11"}},{"key":"os.version","value":{"stringValue":"10.0"}},{"key":"service.instance.id","value":{"stringValue":"2024-09-26T05:51:29.916535600Z"}},{"key":"service.name","value":{"stringValue":"Amper"}},{"key":"service.namespace","value":{"stringValue":"amper"}},{"key":"service.version","value":{"stringValue":"1.0-SNAPSHOT"}}]},"scopeSpans":[{"scope":{"name":"amper","attributes":[]},"spans":[{"traceId":"b1855bb06a23ac1d3e2fb281f8404ab1","spanId":"9273867f9fa35ca0","parentSpanId":"d3313fa66a173288","name":"CLI Setup: install coroutines debug probes","kind":1,"startTimeUnixNano":"1727329890251787700","endTimeUnixNano":"1727329890553119400","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"d5cedbb6b980918d6f63fbece1de512f","spanId":"d7fb358e2f168f8c","parentSpanId":"74fe0d3e6f3de8ee","name":"Init mock IntelliJ project","kind":1,"startTimeUnixNano":"1727329890863193500","endTimeUnixNano":"1727329891056280600","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"d5cedbb6b980918d6f63fbece1de512f","spanId":"74fe0d3e6f3de8ee","parentSpanId":"9aca73720866fe57","name":"Find Amper project: presearch","kind":1,"startTimeUnixNano":"1727329890843880000","endTimeUnixNano":"1727329891061856600","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"d5cedbb6b980918d6f63fbece1de512f","spanId":"353e4e8a94014550","parentSpanId":"465c77b935e3f048","name":"Create project context: parse amper project file","kind":1,"startTimeUnixNano":"1727329891062114100","endTimeUnixNano":"1727329891062130900","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"d5cedbb6b980918d6f63fbece1de512f","spanId":"48c783a2bcaa6b94","parentSpanId":"465c77b935e3f048","name":"Create project context: resolve module paths","kind":1,"startTimeUnixNano":"1727329891062149800","endTimeUnixNano":"1727329891062164400","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"d5cedbb6b980918d6f63fbece1de512f","spanId":"465c77b935e3f048","parentSpanId":"9aca73720866fe57","name":"Find Amper project: create","kind":1,"startTimeUnixNano":"1727329891061913300","endTimeUnixNano":"1727329891062464200","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"d5cedbb6b980918d6f63fbece1de512f","spanId":"9aca73720866fe57","parentSpanId":"da57150f388cf870","name":"CLI Setup: create project context","kind":1,"startTimeUnixNano":"1727329890800555000","endTimeUnixNano":"1727329891062506000","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"d5cedbb6b980918d6f63fbece1de512f","spanId":"da57150f388cf870","name":"CLI Setup: create CliContext","kind":1,"startTimeUnixNano":"1727329890771880800","endTimeUnixNano":"1727329891068015600","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"a170e62f70de2d7909c02095849f49b9","spanId":"c4c4284e769fb784","name":"CLI Setup: setup logging and monitoring","kind":1,"startTimeUnixNano":"1727329891074297000","endTimeUnixNano":"1727329891092103200","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"32133e5d9782c93e","parentSpanId":"b3b1c56976fade17","name":"loading model","kind":1,"startTimeUnixNano":"1727329891097158400","endTimeUnixNano":"1727329891512512100","attributes":[{"key":"root","value":{"stringValue":"C:\\Projects\\TEST\\test-ksp-jvm-dagger"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"34b4bae2f62097bd","parentSpanId":"3063140b43895c1c","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329891602217300","endTimeUnixNano":"1727329892322367500","attributes":[{"key":"coordinates","value":{"stringValue":"com.google.dagger:dagger:2.52 org.jetbrains.kotlin:kotlin-stdlib:2.0.20"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2 https://maven.google.com https://maven.pkg.jetbrains.space/public/p/compose/dev"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"3063140b43895c1c","parentSpanId":"271cca0b7bb01810","name":"inc :test-ksp-jvm-dagger:resolveDependenciesJvm","kind":1,"startTimeUnixNano":"1727329891578913000","endTimeUnixNano":"1727329892342175900","attributes":[{"key":"status","value":{"stringValue":"requires-building"}},{"key":"output-properties","value":{"arrayValue":{"values":[{"stringValue":"compile=m2\\com\\google\\dagger\\dagger\\2.52\\dagger-2.52.jar;m2\\org\\jetbrains\\kotlin\\kotlin-stdlib\\2.0.20\\kotlin-stdlib-2.0.20.jar;m2\\jakarta\\inject\\jakarta.inject-api\\2.0.1\\jakarta.inject-api-2.0.1.jar;m2\\javax\\inject\\javax.inject\\1\\javax.inject-1.jar;m2\\org\\jetbrains\\annotations\\13.0\\annotations-13.0.jar"},{"stringValue":"runtime=m2\\com\\google\\dagger\\dagger\\2.52\\dagger-2.52.jar;m2\\org\\jetbrains\\kotlin\\kotlin-stdlib\\2.0.20\\kotlin-stdlib-2.0.20.jar;m2\\jakarta\\inject\\jakarta.inject-api\\2.0.1\\jakarta.inject-api-2.0.1.jar;m2\\javax\\inject\\javax.inject\\1\\javax.inject-1.jar;m2\\org\\jetbrains\\annotations\\13.0\\annotations-13.0.jar"}]}}},{"key":"inputs","value":{"arrayValue":{"values":[]}}},{"key":"configuration","value":{"arrayValue":{"values":[{"stringValue":"compileDependencies=com.google.dagger:dagger:2.52|org.jetbrains.kotlin:kotlin-stdlib:2.0.20"},{"stringValue":"repositories=https://repo1.maven.org/maven2|https://maven.google.com|https://maven.pkg.jetbrains.space/public/p/compose/dev"},{"stringValue":"resolveNativeTarget="},{"stringValue":"resolvePlatform=jvm"},{"stringValue":"runtimeDependencies=com.google.dagger:dagger:2.52|org.jetbrains.kotlin:kotlin-stdlib:2.0.20"},{"stringValue":"userCacheRoot=amper-cache"}]}}},{"key":"outputs","value":{"arrayValue":{"values":[{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"}]}}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"271cca0b7bb01810","parentSpanId":"df49e96617d030e2","name":"resolve-dependencies","kind":1,"startTimeUnixNano":"1727329891576991300","endTimeUnixNano":"1727329892347067800","attributes":[{"key":"dependencies","value":{"arrayValue":{"values":[{"stringValue":"com.google.dagger:dagger:2.52"},{"stringValue":"org.jetbrains.kotlin:kotlin-stdlib:2.0.20"}]}}},{"key":"platform","value":{"stringValue":"jvm"}},{"key":"fragments","value":{"arrayValue":{"values":[{"stringValue":"jvm"}]}}},{"key":"user-cache-root","value":{"stringValue":"amper-cache"}},{"key":"amper-module","value":{"stringValue":"test-ksp-jvm-dagger"}},{"key":"runtimeDependencies","value":{"arrayValue":{"values":[{"stringValue":"com.google.dagger:dagger:2.52"},{"stringValue":"org.jetbrains.kotlin:kotlin-stdlib:2.0.20"}]}}},{"key":"native-target","value":{"stringValue":"jvm"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"df49e96617d030e2","parentSpanId":"b3b1c56976fade17","name":"task :test-ksp-jvm-dagger:resolveDependenciesJvm","kind":1,"startTimeUnixNano":"1727329891573000200","endTimeUnixNano":"1727329892348771700","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"2b84c603f7b54d97","parentSpanId":"77a3d38868638eea","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329891602217300","endTimeUnixNano":"1727329892378944500","attributes":[{"key":"coordinates","value":{"stringValue":"com.google.dagger:dagger:2.52 org.jetbrains.kotlin:kotlin-stdlib:2.0.20 org.jetbrains.kotlin:kotlin-test-junit:2.0.20"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2 https://maven.google.com https://maven.pkg.jetbrains.space/public/p/compose/dev"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"77a3d38868638eea","parentSpanId":"369cc0da3db5cec9","name":"inc :test-ksp-jvm-dagger:resolveDependenciesJvmTest","kind":1,"startTimeUnixNano":"1727329891578961100","endTimeUnixNano":"1727329892382496600","attributes":[{"key":"status","value":{"stringValue":"requires-building"}},{"key":"output-properties","value":{"arrayValue":{"values":[{"stringValue":"compile=m2\\com\\google\\dagger\\dagger\\2.52\\dagger-2.52.jar;m2\\org\\jetbrains\\kotlin\\kotlin-stdlib\\2.0.20\\kotlin-stdlib-2.0.20.jar;m2\\org\\jetbrains\\kotlin\\kotlin-test-junit\\2.0.20\\kotlin-test-junit-2.0.20.jar;m2\\jakarta\\inject\\jakarta.inject-api\\2.0.1\\jakarta.inject-api-2.0.1.jar;m2\\javax\\inject\\javax.inject\\1\\javax.inject-1.jar;m2\\org\\jetbrains\\annotations\\13.0\\annotations-13.0.jar;m2\\org\\jetbrains\\kotlin\\kotlin-test\\2.0.20\\kotlin-test-2.0.20.jar;m2\\junit\\junit\\4.13.2\\junit-4.13.2.jar;m2\\org\\hamcrest\\hamcrest-core\\1.3\\hamcrest-core-1.3.jar"},{"stringValue":"runtime=m2\\com\\google\\dagger\\dagger\\2.52\\dagger-2.52.jar;m2\\org\\jetbrains\\kotlin\\kotlin-stdlib\\2.0.20\\kotlin-stdlib-2.0.20.jar;m2\\org\\jetbrains\\kotlin\\kotlin-test-junit\\2.0.20\\kotlin-test-junit-2.0.20.jar;m2\\jakarta\\inject\\jakarta.inject-api\\2.0.1\\jakarta.inject-api-2.0.1.jar;m2\\javax\\inject\\javax.inject\\1\\javax.inject-1.jar;m2\\org\\jetbrains\\annotations\\13.0\\annotations-13.0.jar;m2\\org\\jetbrains\\kotlin\\kotlin-test\\2.0.20\\kotlin-test-2.0.20.jar;m2\\junit\\junit\\4.13.2\\junit-4.13.2.jar;m2\\org\\hamcrest\\hamcrest-core\\1.3\\hamcrest-core-1.3.jar"}]}}},{"key":"inputs","value":{"arrayValue":{"values":[]}}},{"key":"configuration","value":{"arrayValue":{"values":[{"stringValue":"compileDependencies=com.google.dagger:dagger:2.52|org.jetbrains.kotlin:kotlin-stdlib:2.0.20|org.jetbrains.kotlin:kotlin-test-junit:2.0.20"},{"stringValue":"repositories=https://repo1.maven.org/maven2|https://maven.google.com|https://maven.pkg.jetbrains.space/public/p/compose/dev"},{"stringValue":"resolveNativeTarget="},{"stringValue":"resolvePlatform=jvm"},{"stringValue":"runtimeDependencies=com.google.dagger:dagger:2.52|org.jetbrains.kotlin:kotlin-stdlib:2.0.20|org.jetbrains.kotlin:kotlin-test-junit:2.0.20"},{"stringValue":"userCacheRoot=amper-cache"}]}}},{"key":"outputs","value":{"arrayValue":{"values":[{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"}]}}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"369cc0da3db5cec9","parentSpanId":"1e657a0cf0762f1e","name":"resolve-dependencies","kind":1,"startTimeUnixNano":"1727329891577060400","endTimeUnixNano":"1727329892382989900","attributes":[{"key":"dependencies","value":{"arrayValue":{"values":[{"stringValue":"com.google.dagger:dagger:2.52"},{"stringValue":"org.jetbrains.kotlin:kotlin-stdlib:2.0.20"},{"stringValue":"org.jetbrains.kotlin:kotlin-test-junit:2.0.20"}]}}},{"key":"platform","value":{"stringValue":"jvm"}},{"key":"fragments","value":{"arrayValue":{"values":[{"stringValue":"jvm"},{"stringValue":"jvmTest"}]}}},{"key":"user-cache-root","value":{"stringValue":"amper-cache"}},{"key":"amper-module","value":{"stringValue":"test-ksp-jvm-dagger"}},{"key":"runtimeDependencies","value":{"arrayValue":{"values":[{"stringValue":"com.google.dagger:dagger:2.52"},{"stringValue":"org.jetbrains.kotlin:kotlin-stdlib:2.0.20"},{"stringValue":"org.jetbrains.kotlin:kotlin-test-junit:2.0.20"}]}}},{"key":"native-target","value":{"stringValue":"jvm"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"1e657a0cf0762f1e","parentSpanId":"b3b1c56976fade17","name":"task :test-ksp-jvm-dagger:resolveDependenciesJvmTest","kind":1,"startTimeUnixNano":"1727329891573070600","endTimeUnixNano":"1727329892383097600","attributes":[],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"06d872b1baa61f8a","parentSpanId":"269dac01fc4a236a","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329892382172300","endTimeUnixNano":"1727329892783475600","attributes":[{"key":"coordinates","value":{"stringValue":"com.google.devtools.ksp:symbol-processing-aa-embeddable:2.0.20-1.0.24 com.google.devtools.ksp:symbol-processing-api:2.0.20-1.0.24 com.google.devtools.ksp:symbol-processing-common-deps:2.0.20-1.0.24"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"269dac01fc4a236a","parentSpanId":"9adc2e667e20fbae","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329892381306200","endTimeUnixNano":"1727329892783971500","attributes":[{"key":"platform","value":{"stringValue":"JVM"}},{"key":"user-cache-root","value":{"stringValue":"amper-cache"}},{"key":"coordinates","value":{"stringValue":"com.google.devtools.ksp:symbol-processing-api:2.0.20-1.0.24 com.google.devtools.ksp:symbol-processing-aa-embeddable:2.0.20-1.0.24 com.google.devtools.ksp:symbol-processing-common-deps:2.0.20-1.0.24"}},{"key":"scope","value":{"stringValue":"RUNTIME"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"9adc2e667e20fbae","parentSpanId":"112ce20019a08680","name":"download-ksp-cli","kind":1,"startTimeUnixNano":"1727329892380333200","endTimeUnixNano":"1727329892784088600","attributes":[{"key":"ksp-version","value":{"stringValue":"2.0.20-1.0.24"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"112ce20019a08680","parentSpanId":"524fa8b50f4d4ae3","name":"inc download-ksp-cli-2.0.20-1.0.24","kind":1,"startTimeUnixNano":"1727329892376929500","endTimeUnixNano":"1727329892786814500","attributes":[{"key":"status","value":{"stringValue":"requires-building"}},{"key":"output-properties","value":{"arrayValue":{"values":[]}}},{"key":"inputs","value":{"arrayValue":{"values":[]}}},{"key":"configuration","value":{"arrayValue":{"values":[{"stringValue":"kspVersion=2.0.20-1.0.24"}]}}},{"key":"outputs","value":{"arrayValue":{"values":[{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"}]}}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"e2b493bd313254e9","parentSpanId":"7bad5c72b6c7578c","name":"inc download-ksp-cli-2.0.20-1.0.24","kind":1,"startTimeUnixNano":"1727329892386113400","endTimeUnixNano":"1727329892793279000","attributes":[{"key":"status","value":{"stringValue":"up-to-date"}},{"key":"output-properties","value":{"arrayValue":{"values":[]}}},{"key":"inputs","value":{"arrayValue":{"values":[]}}},{"key":"configuration","value":{"arrayValue":{"values":[{"stringValue":"kspVersion=2.0.20-1.0.24"}]}}},{"key":"outputs","value":{"arrayValue":{"values":[{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"}]}}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"8a1a0019f3c76f35","parentSpanId":"d3ec186c1bd021f3","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329892795511800","endTimeUnixNano":"1727329893201570100","attributes":[{"key":"coordinates","value":{"stringValue":"com.google.dagger:dagger-compiler:2.52"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2 https://maven.google.com https://maven.pkg.jetbrains.space/public/p/compose/dev"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"2d3a4ca83d569f96","parentSpanId":"fa61efc4800843ae","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329892791754500","endTimeUnixNano":"1727329893201621000","attributes":[{"key":"coordinates","value":{"stringValue":"com.google.dagger:dagger-compiler:2.52"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2 https://maven.google.com https://maven.pkg.jetbrains.space/public/p/compose/dev"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"d3ec186c1bd021f3","parentSpanId":"a789f41122d0b3bc","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329892795332800","endTimeUnixNano":"1727329893203989300","attributes":[{"key":"platform","value":{"stringValue":"JVM"}},{"key":"user-cache-root","value":{"stringValue":"amper-cache"}},{"key":"coordinates","value":{"stringValue":"com.google.dagger:dagger-compiler:2.52"}},{"key":"scope","value":{"stringValue":"RUNTIME"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2 https://maven.google.com https://maven.pkg.jetbrains.space/public/p/compose/dev"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"fa61efc4800843ae","parentSpanId":"576d668929c06372","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329892791535500","endTimeUnixNano":"1727329893204031300","attributes":[{"key":"platform","value":{"stringValue":"JVM"}},{"key":"user-cache-root","value":{"stringValue":"amper-cache"}},{"key":"coordinates","value":{"stringValue":"com.google.dagger:dagger-compiler:2.52"}},{"key":"scope","value":{"stringValue":"RUNTIME"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2 https://maven.google.com https://maven.pkg.jetbrains.space/public/p/compose/dev"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"a789f41122d0b3bc","parentSpanId":"418562459db0c071","name":"resolve-ksp-processors","kind":1,"startTimeUnixNano":"1727329892795290000","endTimeUnixNano":"1727329893204079200","attributes":[{"key":"platform","value":{"stringValue":"jvm"}},{"key":"fragments","value":{"arrayValue":{"values":[{"stringValue":"jvmTest"}]}}},{"key":"amper-module","value":{"stringValue":"test-ksp-jvm-dagger"}},{"key":"ksp-processors","value":{"arrayValue":{"values":[{"stringValue":"com.google.dagger:dagger-compiler:2.52"}]}}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"576d668929c06372","parentSpanId":"b66143b68ca51194","name":"resolve-ksp-processors","kind":1,"startTimeUnixNano":"1727329892790942000","endTimeUnixNano":"1727329893204107900","attributes":[{"key":"platform","value":{"stringValue":"jvm"}},{"key":"fragments","value":{"arrayValue":{"values":[{"stringValue":"jvm"}]}}},{"key":"amper-module","value":{"stringValue":"test-ksp-jvm-dagger"}},{"key":"ksp-processors","value":{"arrayValue":{"values":[{"stringValue":"com.google.dagger:dagger-compiler:2.52"}]}}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"b66143b68ca51194","parentSpanId":"524fa8b50f4d4ae3","name":"inc :test-ksp-jvm-dagger:kspJvm-resolve-ksp-processors","kind":1,"startTimeUnixNano":"1727329892788165600","endTimeUnixNano":"1727329893208819900","attributes":[{"key":"status","value":{"stringValue":"requires-building"}},{"key":"output-properties","value":{"arrayValue":{"values":[]}}},{"key":"inputs","value":{"arrayValue":{"values":[]}}},{"key":"configuration","value":{"arrayValue":{"values":[{"stringValue":"fragments=jvm"},{"stringValue":"processors=com.google.dagger:dagger-compiler:2.52"},{"stringValue":"repositories=https://repo1.maven.org/maven2|https://maven.google.com|https://maven.pkg.jetbrains.space/public/p/compose/dev"},{"stringValue":"userCacheRoot=amper-cache"}]}}},{"key":"outputs","value":{"arrayValue":{"values":[{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"}]}}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"418562459db0c071","parentSpanId":"7bad5c72b6c7578c","name":"inc :test-ksp-jvm-dagger:kspJvmTest-resolve-ksp-processors","kind":1,"startTimeUnixNano":"1727329892793398200","endTimeUnixNano":"1727329893208830300","attributes":[{"key":"status","value":{"stringValue":"requires-building"}},{"key":"output-properties","value":{"arrayValue":{"values":[]}}},{"key":"inputs","value":{"arrayValue":{"values":[]}}},{"key":"configuration","value":{"arrayValue":{"values":[{"stringValue":"fragments=jvmTest"},{"stringValue":"processors=com.google.dagger:dagger-compiler:2.52"},{"stringValue":"repositories=https://repo1.maven.org/maven2|https://maven.google.com|https://maven.pkg.jetbrains.space/public/p/compose/dev"},{"stringValue":"userCacheRoot=amper-cache"}]}}},{"key":"outputs","value":{"arrayValue":{"values":[{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"}]}}}],"events":[],"links":[],"status":{},"flags":257}]}]}
{"resource":{"attributes":[{"key":"host.arch","value":{"stringValue":"amd64"}},{"key":"os.type","value":{"stringValue":"Windows 11"}},{"key":"os.version","value":{"stringValue":"10.0"}},{"key":"service.instance.id","value":{"stringValue":"2024-09-26T05:51:29.916535600Z"}},{"key":"service.name","value":{"stringValue":"Amper"}},{"key":"service.namespace","value":{"stringValue":"amper"}},{"key":"service.version","value":{"stringValue":"1.0-SNAPSHOT"}}]},"scopeSpans":[{"scope":{"name":"amper","attributes":[]},"spans":[{"traceId":"ffb768852803e7522af8507454a24928","spanId":"6aeb56af89eccf72","parentSpanId":"e26f62ed1dd30d7e","name":"java-exec","kind":1,"startTimeUnixNano":"1727329893241401100","endTimeUnixNano":"1727329896445011700","attributes":[{"key":"main-class","value":{"stringValue":"com.google.devtools.ksp.cmdline.KSPJvmMain"}},{"key":"program-args","value":{"arrayValue":{"values":[{"stringValue":"-module-name=test-ksp-jvm-dagger_test"},{"stringValue":"-source-roots=test"},{"stringValue":"-libararies=some/lib.jar"},{"stringValue":"-language-version=2.0"},{"stringValue":"-api-version=2.0"},{"stringValue":"-all-warnings-as-errors=false"},{"stringValue":"-map-annotation-arguments-in-java=false"},{"stringValue":"-incremental=false"},{"stringValue":"-incremental-log=false"},{"stringValue":"-project-base-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger"},{"stringValue":"-output-base-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest"},{"stringValue":"-caches-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\tasks\\_test-ksp-jvm-dagger_kspJvmTest\\ksp-cache"},{"stringValue":"-class-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest\\resources\\ksp"},{"stringValue":"-kotlin-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest\\src\\ksp\\kotlin"},{"stringValue":"-resource-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest\\resources\\ksp"},{"stringValue":"-java-source-roots=test"},{"stringValue":"-java-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest\\src\\ksp\\java"},{"stringValue":"-jdk-home=amper-cache\\extract.cache\\5de2c13edf-amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip.87b69a.d"},{"stringValue":"-jvm-target=17"},{"stringValue":"-jvm-default-mode=disable"},{"stringValue":"somelib.jar"}]}}},{"key":"jvm-args","value":{"arrayValue":{"values":[]}}},{"key":"env-vars","value":{"arrayValue":{"values":[]}}},{"key":"stderr","value":{}},{"key":"java-executable","value":{"stringValue":"amper-cache\\extract.cache\\5de2c13edf-amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip.87b69a.d\\bin\\java.exe"}},{"key":"exit-code","value":{"intValue":"0"}},{"key":"java-version","value":{"stringValue":"21.0.1.12.1"}},{"key":"classpath","value":{"stringValue":"somelib.jar"}},{"key":"stdout","value":{}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"e26f62ed1dd30d7e","parentSpanId":"7bad5c72b6c7578c","name":"inc :test-ksp-jvm-dagger:kspJvmTest-run-ksp","kind":1,"startTimeUnixNano":"1727329893223266300","endTimeUnixNano":"1727329896453328400","attributes":[{"key":"status","value":{"stringValue":"requires-building"}},{"key":"output-properties","value":{"arrayValue":{"values":[]}}},{"key":"inputs","value":{"arrayValue":{"values":[{"stringValue":"C:\\Projects\\TEST\\test-ksp-jvm-dagger\\test"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"}]}}},{"key":"configuration","value":{"arrayValue":{"values":[{"stringValue":"kspCompilationType=JVM"},{"stringValue":"kspConfig=-module-name=test-ksp-jvm-dagger_test -source-roots=test -libraries=some/lib.jar -language-version=2.0 -api-version=2.0 -all-warnings-as-errors=false -map-annotation-arguments-in-java=false -incremental=false -incremental-log=false -project-base-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger -output-base-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest -caches-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\tasks\\_test-ksp-jvm-dagger_kspJvmTest\\ksp-cache -class-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest\\resources\\ksp -kotlin-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest\\src\\ksp\\kotlin -resource-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest\\resources\\ksp -java-source-roots=test -java-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest\\src\\ksp\\java -jdk-home=amper-cache\\extract.cache\\5de2c13edf-amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip.87b69a.d -jvm-target=17 -jvm-default-mode=disable"},{"stringValue":"kspProcessorJars=m2\\com\\google\\dagger\\dagger-compiler\\2.52\\dagger-compiler-2.52.jar|m2\\com\\google\\dagger\\dagger\\2.52\\dagger-2.52.jar|m2\\com\\google\\dagger\\dagger-spi\\2.52\\dagger-spi-2.52.jar|m2\\com\\google\\code\\findbugs\\jsr305\\3.0.2\\jsr305-3.0.2.jar|m2\\com\\google\\devtools\\ksp\\symbol-processing-api\\1.9.24-1.0.20\\symbol-processing-api-1.9.24-1.0.20.jar|m2\\com\\google\\googlejavaformat\\google-java-format\\1.5\\google-java-format-1.5.jar|m2\\com\\google\\guava\\failureaccess\\1.0.2\\failureaccess-1.0.2.jar|m2\\com\\google\\guava\\guava\\33.0.0-jre\\guava-33.0.0-jre.jar|m2\\com\\squareup\\javapoet\\1.13.0\\javapoet-1.13.0.jar|m2\\com\\squareup\\kotlinpoet\\1.11.0\\kotlinpoet-1.11.0.jar|m2\\javax\\inject\\javax.inject\\1\\javax.inject-1.jar|m2\\net\\ltgt\\gradle\\incap\\incap\\0.2\\incap-0.2.jar|m2\\org\\checkerframework\\checker-compat-qual\\2.5.5\\checker-compat-qual-2.5.5.jar|m2\\org\\jetbrains\\kotlin\\kotlin-stdlib\\1.9.24\\kotlin-stdlib-1.9.24.jar|m2\\jakarta\\inject\\jakarta.inject-api\\2.0.1\\jakarta.inject-api-2.0.1.jar|m2\\org\\jetbrains\\kotlin\\kotlin-stdlib-jdk8\\1.9.0\\kotlin-stdlib-jdk8-1.9.0.jar|m2\\com\\google\\errorprone\\javac-shaded\\9-dev-r4023-3\\javac-shaded-9-dev-r4023-3.jar|m2\\com\\google\\guava\\listenablefuture\\9999.0-empty-to-avoid-conflict-with-guava\\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar|m2\\org\\checkerframework\\checker-qual\\3.41.0\\checker-qual-3.41.0.jar|m2\\com\\google\\errorprone\\error_prone_annotations\\2.23.0\\error_prone_annotations-2.23.0.jar|m2\\org\\jetbrains\\kotlin\\kotlin-reflect\\1.6.10\\kotlin-reflect-1.6.10.jar|m2\\org\\jetbrains\\annotations\\13.0\\annotations-13.0.jar|m2\\org\\jetbrains\\kotlin\\kotlin-stdlib-jdk7\\1.9.0\\kotlin-stdlib-jdk7-1.9.0.jar"},{"stringValue":"kspVersion=2.0.20-1.0.24"}]}}},{"key":"outputs","value":{"arrayValue":{"values":[{"stringValue":"C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvmTest"}]}}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"7bad5c72b6c7578c","parentSpanId":"b3b1c56976fade17","name":"task :test-ksp-jvm-dagger:kspJvmTest","kind":1,"startTimeUnixNano":"1727329892383707700","endTimeUnixNano":"1727329896454474000","attributes":[],"events":[{"timeUnixNano":"1727329892383941300","name":"use asset from cache","attributes":[{"key":"target","value":{"stringValue":"amper-cache\\download.cache\\5de2c13edf-amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip"}},{"key":"url","value":{"stringValue":"https://corretto.aws/downloads/resources/21.0.1.12.1/amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip"}}]}],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"00bf8ffe4df744fa","parentSpanId":"ae0c02ee726b26f7","name":"java-exec","kind":1,"startTimeUnixNano":"1727329893241401000","endTimeUnixNano":"1727329897495077000","attributes":[{"key":"main-class","value":{"stringValue":"com.google.devtools.ksp.cmdline.KSPJvmMain"}},{"key":"program-args","value":{"arrayValue":{"values":[{"stringValue":"-module-name=test-ksp-jvm-dagger"},{"stringValue":"-source-roots=src"},{"stringValue":"-libararies=some/lib.jar"},{"stringValue":"-language-version=2.0"},{"stringValue":"-api-version=2.0"},{"stringValue":"-all-warnings-as-errors=false"},{"stringValue":"-map-annotation-arguments-in-java=false"},{"stringValue":"-incremental=false"},{"stringValue":"-incremental-log=false"},{"stringValue":"-project-base-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger"},{"stringValue":"-output-base-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm"},{"stringValue":"-caches-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\tasks\\_test-ksp-jvm-dagger_kspJvm\\ksp-cache"},{"stringValue":"-class-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm\\resources\\ksp"},{"stringValue":"-kotlin-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm\\src\\ksp\\kotlin"},{"stringValue":"-resource-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm\\resources\\ksp"},{"stringValue":"-java-source-roots=src"},{"stringValue":"-java-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm\\src\\ksp\\java"},{"stringValue":"-jdk-home=amper-cache\\extract.cache\\5de2c13edf-amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip.87b69a.d"},{"stringValue":"-jvm-target=17"},{"stringValue":"-jvm-default-mode=disable"},{"stringValue":"somelib.jar"}]}}},{"key":"jvm-args","value":{"arrayValue":{"values":[]}}},{"key":"env-vars","value":{"arrayValue":{"values":[]}}},{"key":"stderr","value":{}},{"key":"java-executable","value":{"stringValue":"amper-cache\\extract.cache\\5de2c13edf-amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip.87b69a.d\\bin\\java.exe"}},{"key":"exit-code","value":{"intValue":"0"}},{"key":"java-version","value":{"stringValue":"21.0.1.12.1"}},{"key":"classpath","value":{"stringValue":"somelib.jar"}},{"key":"stdout","value":{}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"ae0c02ee726b26f7","parentSpanId":"524fa8b50f4d4ae3","name":"inc :test-ksp-jvm-dagger:kspJvm-run-ksp","kind":1,"startTimeUnixNano":"1727329893223250400","endTimeUnixNano":"1727329897500537500","attributes":[{"key":"status","value":{"stringValue":"requires-building"}},{"key":"output-properties","value":{"arrayValue":{"values":[]}}},{"key":"inputs","value":{"arrayValue":{"values":[{"stringValue":"C:\\Projects\\TEST\\test-ksp-jvm-dagger\\src"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"}]}}},{"key":"configuration","value":{"arrayValue":{"values":[{"stringValue":"kspCompilationType=JVM"},{"stringValue":"kspConfig=-module-name=test-ksp-jvm-dagger -source-roots=src -libraries=some/lib.jar -language-version=2.0 -api-version=2.0 -all-warnings-as-errors=false -map-annotation-arguments-in-java=false -incremental=false -incremental-log=false -project-base-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger -output-base-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm -caches-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\tasks\\_test-ksp-jvm-dagger_kspJvm\\ksp-cache -class-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm\\resources\\ksp -kotlin-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm\\src\\ksp\\kotlin -resource-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm\\resources\\ksp -java-source-roots=src -java-output-dir=C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm\\src\\ksp\\java -jdk-home=amper-cache\\extract.cache\\5de2c13edf-amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip.87b69a.d -jvm-target=17 -jvm-default-mode=disable"},{"stringValue":"kspProcessorJars=m2\\com\\google\\dagger\\dagger-compiler\\2.52\\dagger-compiler-2.52.jar|m2\\com\\google\\dagger\\dagger\\2.52\\dagger-2.52.jar|m2\\com\\google\\dagger\\dagger-spi\\2.52\\dagger-spi-2.52.jar|m2\\com\\google\\code\\findbugs\\jsr305\\3.0.2\\jsr305-3.0.2.jar|m2\\com\\google\\devtools\\ksp\\symbol-processing-api\\1.9.24-1.0.20\\symbol-processing-api-1.9.24-1.0.20.jar|m2\\com\\google\\googlejavaformat\\google-java-format\\1.5\\google-java-format-1.5.jar|m2\\com\\google\\guava\\failureaccess\\1.0.2\\failureaccess-1.0.2.jar|m2\\com\\google\\guava\\guava\\33.0.0-jre\\guava-33.0.0-jre.jar|m2\\com\\squareup\\javapoet\\1.13.0\\javapoet-1.13.0.jar|m2\\com\\squareup\\kotlinpoet\\1.11.0\\kotlinpoet-1.11.0.jar|m2\\javax\\inject\\javax.inject\\1\\javax.inject-1.jar|m2\\net\\ltgt\\gradle\\incap\\incap\\0.2\\incap-0.2.jar|m2\\org\\checkerframework\\checker-compat-qual\\2.5.5\\checker-compat-qual-2.5.5.jar|m2\\org\\jetbrains\\kotlin\\kotlin-stdlib\\1.9.24\\kotlin-stdlib-1.9.24.jar|m2\\jakarta\\inject\\jakarta.inject-api\\2.0.1\\jakarta.inject-api-2.0.1.jar|m2\\org\\jetbrains\\kotlin\\kotlin-stdlib-jdk8\\1.9.0\\kotlin-stdlib-jdk8-1.9.0.jar|m2\\com\\google\\errorprone\\javac-shaded\\9-dev-r4023-3\\javac-shaded-9-dev-r4023-3.jar|m2\\com\\google\\guava\\listenablefuture\\9999.0-empty-to-avoid-conflict-with-guava\\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar|m2\\org\\checkerframework\\checker-qual\\3.41.0\\checker-qual-3.41.0.jar|m2\\com\\google\\errorprone\\error_prone_annotations\\2.23.0\\error_prone_annotations-2.23.0.jar|m2\\org\\jetbrains\\kotlin\\kotlin-reflect\\1.6.10\\kotlin-reflect-1.6.10.jar|m2\\org\\jetbrains\\annotations\\13.0\\annotations-13.0.jar|m2\\org\\jetbrains\\kotlin\\kotlin-stdlib-jdk7\\1.9.0\\kotlin-stdlib-jdk7-1.9.0.jar"},{"stringValue":"kspVersion=2.0.20-1.0.24"}]}}},{"key":"outputs","value":{"arrayValue":{"values":[{"stringValue":"C:\\Projects\\TEST\\test-ksp-jvm-dagger\\build\\generated\\test-ksp-jvm-dagger\\jvm"}]}}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"524fa8b50f4d4ae3","parentSpanId":"b3b1c56976fade17","name":"task :test-ksp-jvm-dagger:kspJvm","kind":1,"startTimeUnixNano":"1727329892349434500","endTimeUnixNano":"1727329897500704800","attributes":[],"events":[{"timeUnixNano":"1727329892360458900","name":"use asset from cache","attributes":[{"key":"target","value":{"stringValue":"amper-cache\\download.cache\\5de2c13edf-amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip"}},{"key":"url","value":{"stringValue":"https://corretto.aws/downloads/resources/21.0.1.12.1/amazon-corretto-21.0.1.12.1-windows-x64-jdk.zip"}}]}],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"3dacb2226f2373e6","parentSpanId":"b443e0b76a1f9304","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329897518471200","endTimeUnixNano":"1727329897995904500","attributes":[{"key":"coordinates","value":{"stringValue":"org.jetbrains.kotlin:kotlin-build-tools-impl:2.0.20"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"b443e0b76a1f9304","parentSpanId":"59a8dbc92b0abf57","name":"mavenResolve","kind":1,"startTimeUnixNano":"1727329897518303800","endTimeUnixNano":"1727329897996703600","attributes":[{"key":"platform","value":{"stringValue":"JVM"}},{"key":"user-cache-root","value":{"stringValue":"amper-cache"}},{"key":"coordinates","value":{"stringValue":"org.jetbrains.kotlin:kotlin-build-tools-impl:2.0.20"}},{"key":"scope","value":{"stringValue":"RUNTIME"}},{"key":"repositories","value":{"stringValue":"https://repo1.maven.org/maven2"}}],"events":[],"links":[],"status":{},"flags":257},{"traceId":"ffb768852803e7522af8507454a24928","spanId":"59a8dbc92b0abf57","parentSpanId":"a8ee93a0fce92470","name":"inc resolve-org.jetbrains.kotlin-kotlin-build-tools-impl-2.0.20","kind":1,"startTimeUnixNano":"1727329897516119700","endTimeUnixNano":"1727329897998972100","attributes":[{"key":"status","value":{"stringValue":"requires-building"}},{"key":"output-properties","value":{"arrayValue":{"values":[]}}},{"key":"inputs","value":{"arrayValue":{"values":[]}}},{"key":"configuration","value":{"arrayValue":{"values":[]}}},{"key":"outputs","value":{"arrayValue":{"values":[{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"},{"stringValue":"somelib.jar"}]}}}],"events":[],"links":[],"status":{},"flags":257}]}]}

What version and what artifacts are you using?
Artifacts:

opentelemetry-api
opentelemetry-exporterLoggingOtlp
opentelemetry-kotlin
opentelemetry-sdk
opentelemetry-sdkTrace

Version: 1.42.1

How did you reference these artifacts? (excerpt from your build.gradle, pom.xml, etc) My Gradle catalog:

opentelemetry-api = { module = "io.opentelemetry:opentelemetry-api", version.ref = "opentelemetry" }
opentelemetry-exporterLoggingOtlp = { module = "io.opentelemetry:opentelemetry-exporter-logging-otlp", version.ref = "opentelemetry" }
opentelemetry-kotlin = { module = "io.opentelemetry:opentelemetry-extension-kotlin", version.ref = "opentelemetry" }
opentelemetry-sdk = { module = "io.opentelemetry:opentelemetry-sdk", version.ref = "opentelemetry" }
opentelemetry-sdkTrace = { module = "io.opentelemetry:opentelemetry-sdk-trace", version.ref = "opentelemetry" }

Environment
Compiler: Corretto 21
OS: Windows

Additional context
This is a CLI application exporting telemetry in log files (for which JSON lines are important), and visualization is done in Jaeger UI after the fact.

@joffrey-bion joffrey-bion added the Bug Something isn't working label Sep 26, 2024
@shalk
Copy link
Contributor

shalk commented Sep 29, 2024

I think OtlpJsonLoggingSpanExporter is not relate with the File Exporter in Specification.

  1. OtlpJsonLoggingSpanExporter is a exporter only in opentelemetry-java, it is Logs span to JUL in the OTLP JSON encoding. class OtlpJsonLoggingSpanExporter which type is logging-otlp is intend to generate json without "resourceSpans" outside it. see the unit test https://github.com/open-telemetry/opentelemetry-java/blob/main/exporters/logging-otlp/src/test/java/io/opentelemetry/exporter/logging/otlp/OtlpJsonLoggingSpanExporterTest.java#L111

  2. File Exporter is implemented by other repository https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/fileexporter

@joffrey-bion
Copy link
Author

Thanks for the explanation. Is there an alternative in opentelemetry-java to write traces to a FileExporter-compliant JSON lines file?

I'm writing a JVM-based CLI application and would like to append spans to a JSON lines file for consumption with local tools (like Jaeger UI).

@shalk
Copy link
Contributor

shalk commented Oct 10, 2024

I do not found an alternative. maybe you can implement a exporter or setup a collector

@cyrille-leclerc
Copy link
Member

I face the same problem with logs emitted by the logging-otlp. They lack the {"resourceLogs": [...]} parent element and thus don't comply with the otlpjson Connector of the OTel Collector.
cc @zeitlinger

@zeitlinger
Copy link
Member

Please use this as logs exporter

https://github.com/open-telemetry/opentelemetry-java/pull/6675/files#diff-32896918b1855d337a090830066d5379b2422e5f5bed82a3485e42a04ef9decbR27

@jack-berg
Copy link
Member

Closing as this is resolved with the new OTLP stdout exporters: OtlpStdoutLogRecordExporter, OtlpStdoutSpanExporter, OtlpStdoutMetricExporter

Available for reference in OTEL_{SIGNAL}_EXPORTER via experimental-otlp/stdout.

@joffrey-bion
Copy link
Author

joffrey-bion commented Nov 7, 2024

Apparently the OtlpStdoutSpanExporter doesn't generate separate lines for each JSON object. So I get this error when importing in Jaeger UI:

Error parsing JSON at line 1: Unexpected non-whitespace character after JSON at position 62519 (line 1 column 62520)

Basically, the file looks like this:

{"resourceSpans":[...]}{"resourceSpans":[...]}

Instead of:

{"resourceSpans":[...]}
{"resourceSpans":[...]}

@cyrille-leclerc
Copy link
Member

cyrille-leclerc commented Nov 7, 2024

@joffrey-bion, I faced the same problem with resourceLogs and reported it as:

I think @zeitlinger fixed this in

@zeitlinger 's PR is merged and should be released in otel-java v1.44.0 something like next week and soon after in the otel-java-instrumentation agent v2.10.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants