Commit Graph

42 Commits

Author SHA1 Message Date
Cyrille Le Clerc 2dad6f5e5e
The `HostIdResourceProvider` should instantiate an `HostIdResource`, not an `HostResource` (#13628) 2025-04-02 09:32:19 +03:00
otelbot[bot] df111a4381
Update the OpenTelemetry SDK version to 1.48.0 (#13476)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Jason Plumb <jplumb@splunk.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2025-03-11 13:55:13 +02:00
Lauri Tulmin 77bf68ac90
Scrub secrets from process arguments (#13225) 2025-02-11 19:10:37 -08:00
Lauri Tulmin edbd9aa8ab
Disable container id detection on z/os (#13042) 2025-01-22 18:50:21 +02:00
OpenTelemetry Bot 0e099b281b
Update the OpenTelemetry SDK version to 1.44.1 (#12603)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-11-10 03:29:43 +00:00
Trask Stalnaker a0abd638af
Fix the build (#12579) 2024-11-06 18:23:03 +00:00
Trask Stalnaker 2371589ec5
Statically import semconv constants in tests (#12575) 2024-11-06 08:17:57 -08:00
misaya 3ad4269802
compatible different command line style for find jar path (#12544) 2024-11-06 07:14:26 -08:00
renovate[bot] 855c7a0fad
fix(deps): update dependency io.opentelemetry.semconv:opentelemetry-semconv to v1.28.0-alpha (#12292)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2024-10-28 10:55:06 -07:00
OpenTelemetry Bot 43a1dd7975
Update the OpenTelemetry SDK version to 1.43.0 (#12435)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-10-11 13:23:45 -07:00
Jay DeLuca 5e5be42d05
Reduce flakyness of Resource tests (#12252) 2024-09-16 09:01:09 -07:00
jack-berg 2a7a5530f3
Add declarative config support for resource providers (#12144)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2024-09-12 08:19:55 -07:00
Rui Liu bfb1a64906
Fix container.id issue in some crio scenarios (#11382) 2024-05-20 12:41:03 +03:00
Lauri Tulmin 3a9972b16f
Remove incubating semconv dependency from library instrumentation (#11324) 2024-05-15 11:44:21 -07:00
SylvainJuge 955470a63a
Semconv 1.25.0 migration (#10983)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-09 11:25:52 -07:00
Lauri Tulmin dea9ff79de
Correct comment (#10882) 2024-03-18 21:32:31 +02:00
Gregor Zeitlinger 17b6cad16f
fix and improve manifest resource provider (#10857)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2024-03-14 16:03:56 +02:00
Gregor Zeitlinger 5df8a5a0a0
Manifest resource detector (#10621)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-03-13 13:12:35 -07:00
Gregor Zeitlinger 002933282c
add host.id resource provider (#10627)
Co-authored-by: Jason Plumb <jplumb@splunk.com>
2024-03-12 16:01:41 -07:00
Rui Liu 93bb1febea
Fix the logic to get container.id resource attribute (#10737)
Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2024-03-12 15:54:33 -07:00
Lauri Tulmin 795c053dc6
Fix spec links (#9603) 2023-10-04 17:54:35 +03:00
Trask Stalnaker 3b77cc4b2d
Semconv 1.21 (#9408)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-09-13 19:20:23 +00:00
Lauri Tulmin 7e16e40ca2
Update opentelemetry-java to 1.30.1 (#9433) 2023-09-11 14:36:37 -07:00
Mateusz Rzeszutek 6ac134b19f
Ensure .class files aren't present in the resources library MR jar (#9245) 2023-08-18 11:25:03 +02:00
Mateusz Rzeszutek 9e37e724dc
Fix the main branch history (#8817) 2023-06-28 10:55:41 +00:00
Abhinandan Seshadri f25cd6354c
Convert spring rabbitmq tests from groovy to java (#8765)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
Co-authored-by: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Co-authored-by: Christian Neumüller <christian.neumueller@dynatrace.com>
2023-06-28 10:51:27 +02:00
SylvainJuge 09d3ac55d2
[minor cleanup] remove shell output from cgroup examples (#8797) 2023-06-23 15:08:08 +02:00
dependabot[bot] 3122897b2e
Bump errorProneVersion from 2.18.0 to 2.19.0 (#8459)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-05-10 09:49:55 -07:00
Tyler Benson afc327e14d
Populate `process.command_args` for Java 9+ and improve `process.command_line` for Java 8 (#8130) 2023-04-13 09:23:14 -07:00
jason plumb 32b6bd2a71
Ensure that parsed container ID is 64 chars. (#8206)
Resolves #7437.

A few caveats about this. The TL;DR on #7437 is that a non-containerized
process was reporting a `container.id` attribute. The submitter narrowed
it down and I was able to confirm with the test case in this PR.

I hunted for other means for code to determine if it's containerized
with the idea to not even do the parsing if not containerized, but I
couldn't find anything useful. In fact, most approaches of detecting
containerization at all do involve parsing cgroups. Wacky.

So I attempted to verify that container IDs should always be 64
characters. I found:
* podman - docs
[here](https://docs.podman.io/en/latest/markdown/podman-container-inspect.1.html)
"Container ID (full 64-char hash)"
* docker - UID generator source
[here](634a848b8e/pkg/stringid/stringid.go (L36))
shows 32 bytes (and even guards against fully numeric!)
* lxc [man page
](https://linuxcontainers.org/lxc/manpages/man1/lxc-info.1.html)says
"container identifier format is an alphanumeric string". If this maps
into cgroups (no idea!), it would have already been broken in some cases
because we enforce hex.

I'm a little concerned about this approach because the [otel
spec](94c9c75c4f/specification/resource/semantic_conventions/container.md)
suggests that "The UUID might be abbreviated.", but it's
unclear/non-specific about the circumstances that might cause this.

Open to hearing about why the approach presented here is a bad idea. 🙃
2023-04-04 09:37:23 -07:00
Mateusz Rzeszutek d89932098a
Disable YodaCondition check and revert some of the changes (#7596)
Let's keep close to the SDK repo config. 

I reverted some of the changes, only left those that I think make sense
anyway (e.g. comparing enums with `==`)
2023-01-17 19:44:15 -08:00
Trask Stalnaker 9882f3f901
Fix potential startup failure (#7567)
Can be reproduce (at least on Windows) using

```
java -javaagent:opentelemetry-javaagent.jar anything C:\one
```

producing

```
[otel.javaagent 2023-01-13 11:38:47:978 -0800] [main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 1.22.0
OpenTelemetry Javaagent failed to start
java.nio.file.InvalidPathException: Illegal char <:> at index 10: anything C:\one
        at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
        at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
        at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
        at java.base/java.nio.file.Path.of(Path.java:147)
        at java.base/java.nio.file.Paths.get(Paths.java:69)
        at io.opentelemetry.instrumentation.resources.JarServiceNameDetector.getJarPathFromSunCommandLine(JarServiceNameDetector.java:104)
        at io.opentelemetry.instrumentation.resources.JarServiceNameDetector.createResource(JarServiceNameDetector.java:59)
        at io.opentelemetry.sdk.autoconfigure.ResourceConfiguration.configureResource(ResourceConfiguration.java:59)
        at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.build(AutoConfiguredOpenTelemetrySdkBuilder.java:332)
        at io.opentelemetry.javaagent.tooling.OpenTelemetryInstaller.installOpenTelemetrySdk(OpenTelemetryInstaller.java:29)
        at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:114)
        at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:94)
        at io.opentelemetry.javaagent.tooling.AgentStarterImpl.start(AgentStarterImpl.java:78)
        at io.opentelemetry.javaagent.bootstrap.AgentInitializer.initialize(AgentInitializer.java:35)
        at io.opentelemetry.javaagent.OpenTelemetryAgent.startAgent(OpenTelemetryAgent.java:57)
        at io.opentelemetry.javaagent.OpenTelemetryAgent.premain(OpenTelemetryAgent.java:45)
```
2023-01-13 22:51:23 +00:00
dependabot[bot] f335861136
Bump errorProneVersion from 2.17.0 to 2.18.0 (#7532)
Bumps `errorProneVersion` from 2.17.0 to 2.18.0.
Updates `error_prone_annotations` from 2.17.0 to 2.18.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/error-prone/releases">error_prone_annotations's
releases</a>.</em></p>
<blockquote>
<h2>Error Prone 2.18.0</h2>
<p>New Checkers:</p>
<ul>
<li><a
href="https://errorprone.info/bugpattern/InjectOnBugCheckers"><code>InjectOnBugCheckers</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/LabelledBreakTarget"><code>LabelledBreakTarget</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/UnusedLabel"><code>UnusedLabel</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/YodaCondition"><code>YodaCondition</code></a></li>
</ul>
<p>Fixes issues: <a
href="https://github-redirect.dependabot.com/google/error-prone/issues/1650">#1650</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/2706">#2706</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3404">#3404</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3493">#3493</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3504">#3504</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3519">#3519</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3579">#3579</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3610">#3610</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3632">#3632</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3638">#3638</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3645">#3645</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3646">#3646</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3652">#3652</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3690">#3690</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">https://github.com/google/error-prone/compare/v2.17.0...v2.18.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="34730decfe"><code>34730de</code></a>
Release Error Prone 2.18.0</li>
<li><a
href="ee1e7778d3"><code>ee1e777</code></a>
Remove <code>DoNoCall</code> flags for checking <code>Thread.run</code>
and various <code>getClass</code> meth...</li>
<li><a
href="bb9ede9f25"><code>bb9ede9</code></a>
Delete dependabot.yml</li>
<li><a
href="7f459e14cd"><code>7f459e1</code></a>
Refaster: support method invocation type argument inlining</li>
<li><a
href="a57309b018"><code>a57309b</code></a>
Add a check to reverse Yoda conditions.</li>
<li><a
href="181f9918bc"><code>181f991</code></a>
Use <code>ASTHelpers.enclosingClass</code>.</li>
<li><a
href="360ed99da2"><code>360ed99</code></a>
Don't generate a &quot;Suppression&quot; section that recommends
`@SuppressWarnings(&quot;Ch...</li>
<li><a
href="c06c7b8b6e"><code>c06c7b8</code></a>
Look for infinite recursion in the first statement of multi-statement
methods.</li>
<li><a
href="0f5753f67b"><code>0f5753f</code></a>
Reverse Yoda conditions in EP.</li>
<li><a
href="f36a502b5f"><code>f36a502</code></a>
Make MemoizeConstantVisitorStateLookups check suppressible</li>
<li>Additional commits viewable in <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `error_prone_core` from 2.17.0 to 2.18.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/error-prone/releases">error_prone_core's
releases</a>.</em></p>
<blockquote>
<h2>Error Prone 2.18.0</h2>
<p>New Checkers:</p>
<ul>
<li><a
href="https://errorprone.info/bugpattern/InjectOnBugCheckers"><code>InjectOnBugCheckers</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/LabelledBreakTarget"><code>LabelledBreakTarget</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/UnusedLabel"><code>UnusedLabel</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/YodaCondition"><code>YodaCondition</code></a></li>
</ul>
<p>Fixes issues: <a
href="https://github-redirect.dependabot.com/google/error-prone/issues/1650">#1650</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/2706">#2706</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3404">#3404</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3493">#3493</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3504">#3504</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3519">#3519</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3579">#3579</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3610">#3610</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3632">#3632</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3638">#3638</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3645">#3645</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3646">#3646</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3652">#3652</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3690">#3690</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">https://github.com/google/error-prone/compare/v2.17.0...v2.18.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="34730decfe"><code>34730de</code></a>
Release Error Prone 2.18.0</li>
<li><a
href="ee1e7778d3"><code>ee1e777</code></a>
Remove <code>DoNoCall</code> flags for checking <code>Thread.run</code>
and various <code>getClass</code> meth...</li>
<li><a
href="bb9ede9f25"><code>bb9ede9</code></a>
Delete dependabot.yml</li>
<li><a
href="7f459e14cd"><code>7f459e1</code></a>
Refaster: support method invocation type argument inlining</li>
<li><a
href="a57309b018"><code>a57309b</code></a>
Add a check to reverse Yoda conditions.</li>
<li><a
href="181f9918bc"><code>181f991</code></a>
Use <code>ASTHelpers.enclosingClass</code>.</li>
<li><a
href="360ed99da2"><code>360ed99</code></a>
Don't generate a &quot;Suppression&quot; section that recommends
`@SuppressWarnings(&quot;Ch...</li>
<li><a
href="c06c7b8b6e"><code>c06c7b8</code></a>
Look for infinite recursion in the first statement of multi-statement
methods.</li>
<li><a
href="0f5753f67b"><code>0f5753f</code></a>
Reverse Yoda conditions in EP.</li>
<li><a
href="f36a502b5f"><code>f36a502</code></a>
Make MemoizeConstantVisitorStateLookups check suppressible</li>
<li>Additional commits viewable in <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `error_prone_test_helpers` from 2.17.0 to 2.18.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/error-prone/releases">error_prone_test_helpers's
releases</a>.</em></p>
<blockquote>
<h2>Error Prone 2.18.0</h2>
<p>New Checkers:</p>
<ul>
<li><a
href="https://errorprone.info/bugpattern/InjectOnBugCheckers"><code>InjectOnBugCheckers</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/LabelledBreakTarget"><code>LabelledBreakTarget</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/UnusedLabel"><code>UnusedLabel</code></a></li>
<li><a
href="https://errorprone.info/bugpattern/YodaCondition"><code>YodaCondition</code></a></li>
</ul>
<p>Fixes issues: <a
href="https://github-redirect.dependabot.com/google/error-prone/issues/1650">#1650</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/2706">#2706</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3404">#3404</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3493">#3493</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3504">#3504</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3519">#3519</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3579">#3579</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3610">#3610</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3632">#3632</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3638">#3638</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3645">#3645</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3646">#3646</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3652">#3652</a>,
<a
href="https://github-redirect.dependabot.com/google/error-prone/issues/3690">#3690</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">https://github.com/google/error-prone/compare/v2.17.0...v2.18.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="34730decfe"><code>34730de</code></a>
Release Error Prone 2.18.0</li>
<li><a
href="ee1e7778d3"><code>ee1e777</code></a>
Remove <code>DoNoCall</code> flags for checking <code>Thread.run</code>
and various <code>getClass</code> meth...</li>
<li><a
href="bb9ede9f25"><code>bb9ede9</code></a>
Delete dependabot.yml</li>
<li><a
href="7f459e14cd"><code>7f459e1</code></a>
Refaster: support method invocation type argument inlining</li>
<li><a
href="a57309b018"><code>a57309b</code></a>
Add a check to reverse Yoda conditions.</li>
<li><a
href="181f9918bc"><code>181f991</code></a>
Use <code>ASTHelpers.enclosingClass</code>.</li>
<li><a
href="360ed99da2"><code>360ed99</code></a>
Don't generate a &quot;Suppression&quot; section that recommends
`@SuppressWarnings(&quot;Ch...</li>
<li><a
href="c06c7b8b6e"><code>c06c7b8</code></a>
Look for infinite recursion in the first statement of multi-statement
methods.</li>
<li><a
href="0f5753f67b"><code>0f5753f</code></a>
Reverse Yoda conditions in EP.</li>
<li><a
href="f36a502b5f"><code>f36a502</code></a>
Make MemoizeConstantVisitorStateLookups check suppressible</li>
<li>Additional commits viewable in <a
href="https://github.com/google/error-prone/compare/v2.17.0...v2.18.0">compare
view</a></li>
</ul>
</details>
<br />


You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-01-11 20:25:46 -08:00
dependabot[bot] 789b66d455
Bump spotless-plugin-gradle from 6.12.0 to 6.12.1 (#7500)
Bumps [spotless-plugin-gradle](https://github.com/diffplug/spotless)
from 6.12.0 to 6.12.1.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="718a504c12"><code>718a504</code></a>
Published gradle/6.12.1</li>
<li><a
href="c13acee213"><code>c13acee</code></a>
Published lib/2.31.1</li>
<li><a
href="552aabf876"><code>552aabf</code></a>
fix(deps): update dependency com.facebook:ktfmt to v0.42 (<a
href="https://github-redirect.dependabot.com/diffplug/spotless/issues/1421">#1421</a>)</li>
<li><a
href="4063e9f6d1"><code>4063e9f</code></a>
Add support for KtLint 0.48.0 (<a
href="https://github-redirect.dependabot.com/diffplug/spotless/issues/1432">#1432</a>
fixes <a
href="https://github-redirect.dependabot.com/diffplug/spotless/issues/1430">#1430</a>)</li>
<li><a
href="062e835846"><code>062e835</code></a>
Bump changelogs.</li>
<li><a
href="8f7e00594d"><code>8f7e005</code></a>
spotlessApply</li>
<li><a
href="9a8ccae9ec"><code>9a8ccae</code></a>
Bump default ktfmt 0.41 -&gt; 0.42</li>
<li><a
href="fb4277d2b1"><code>fb4277d</code></a>
Merge branch 'main-ktlint-0.48.0' into renovate/ver_ktfmt</li>
<li><a
href="b44d70d00a"><code>b44d70d</code></a>
Move changelog entries to the correct release.</li>
<li><a
href="b3d8e89002"><code>b3d8e89</code></a>
spotlessApply for 2023</li>
<li>Additional commits viewable in <a
href="https://github.com/diffplug/spotless/compare/gradle/6.12.0...gradle/6.12.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.diffplug.spotless:spotless-plugin-gradle&package-manager=gradle&previous-version=6.12.0&new-version=6.12.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-01-03 09:58:06 +00:00
jason plumb 264edd98fc
More flexible cgroupv2 container id parsing (and podman support) (#7361)
This is based on a conversation in [opentelemetry-go
#3508](https://github.com/open-telemetry/opentelemetry-go/pull/3508) and
to be more consistent with [the js cgroupv2 parser
impl](f0a93685cf/detectors/node/opentelemetry-resource-detector-container/src/detectors/ContainerDetector.ts (L68)).

Unsurprisingly, podman does not include the word `docker` in the
`mountinfo` file. As a result, the container id parsing would fail from
inside a podman container. This fixes that up to be more compatible.
2022-12-09 17:14:38 -08:00
Aaron Ai 2d7395c44b
Introduce markdown lint check (#7175)
Fixes #7129
2022-11-16 20:48:42 -08:00
jack-berg 97f036c3e5
Stop relocating :instrumentation:resources:library (#7136)
Per the discussion in the today's SIG and this
[comment](https://github.com/open-telemetry/opentelemetry-java/issues/4919#issuecomment-1305774636).

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-11-15 22:37:17 +00:00
jason plumb b09fb67e6b
Support cgroup v2 (#7167)
This resolves #6694.

We've been tracking the update to cgroup version support and want to get
ahead of the widespread usage. The surface of the existing
`ContainerResource` has not changed, but its internals have been
factored out to two "extractor" utilities -- one that understands cgroup
v1 and another for v2. v1 is attempted and, if successful, the result is
used. If v1 fails, then the `ContainerResource` will fall back to v2.

As mentioned in #6694, the approach taken in this PR is borrowed from
[this SO
post](https://stackoverflow.com/questions/68816329/how-to-get-docker-container-id-from-within-the-container-with-cgroup-v2)
combined with local experimentation on docker desktop on a Mac, which
already uses cgroup2 v2.
2022-11-15 12:12:11 -08:00
Mateusz Rzeszutek 33b06889fa
Auto-detect service name based on the jar name (#6817)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-10-22 18:10:21 -07:00
Etienne Dysli Metref 6fb1f00241
Refactor `io.opentelemetry.instrumentation.resources.ContainerResource` to avoid using null (#6889)
While I was looking at issues
open-telemetry/opentelemetry-java-instrumentation#6694 and
open-telemetry/opentelemetry-java#2337, I saw that the code in
`io.opentelemetry.instrumentation.resources.ContainerResource` used
`null` several times as return value which isn't safe. Nowadays,
`Optional` is better suited to signal the absence of a result, so I
refactored `ContainerResource` to use `Optional`s instead of null.

On the way, I also refactored this class's unit tests into parameterised
tests to reduce test code duplication. These improvements should help
implementing a solution to
open-telemetry/opentelemetry-java-instrumentation#6694.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-10-19 03:00:43 +00:00
Fabien Crespel 7cb57e1fb1
Fix directory separator in ProcessResource attributes (#6716)
The separator char used to build the Java executable path in
ProcessResource is wrong: `File.pathSeparatorChar` is the PATH variable
separator (`:` on Linux, `;` on Windows), the right one for directories
is `File.separatorChar` (`/` on Linux, `\` on Windows).

Note that this issue was already present in
[sdk-extensions-resources](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/resources/src/main/java/io/opentelemetry/sdk/extension/resources/ProcessResource.java#L64)
before it was moved here; should it be fixed there too?
2022-09-26 16:17:21 -07:00
jack-berg 6b607c1e18
Add resource providers (#6574)
* Add resource providers

* Use autoservice annotation
2022-09-14 15:45:24 -07:00