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

Instrument Pekko (by copying from akka) #9527

Merged
merged 8 commits into from
Sep 29, 2023
Merged

Conversation

samwright
Copy link
Contributor

Apache Pekko (https://pekko.apache.org/) is a fork of Akka 2.6 with an Apache 2.0 license. As such,
its instrumentation should be fairly simple. My process here was:

  1. Copy the akka instrumentation modules
  2. Refactor everything to point to pekko classes
  3. Rename everything from "akka" to "pekko"
  4. In ExecutorMatchers and FutureInstrumentation copy references to akka to also refer to pekko

The only change I noticed is that there is no equivalent to the akka.dispatch.forkjoin.ForkJoinPool which the
:instrumentations:akka-actor-fork-join-2.5 module was instrumenting.
As such I didn't copy that module over.

Apache Pekko (https://pekko.apache.org/) is a fork
of Akka 2.6 with an Apache 2.0 license. As such,
its instrumentation should be fairly simple. My process here was:

1. Copy the akka instrumentation modules
2. Refactor everything to point to pekko classes
3. Rename everything from "akka" to "pekko"
4. In `ExecutorMatchers` and `FutureInstrumentation` copy references to akka to also refer to pekko

The only change I noticed is that there is no equivalent to the
`akka.dispatch.forkjoin.ForkJoinPool` which the
 `:instrumentations:akka-actor-fork-join-2.5` module was instrumenting.
 As such I didn't copy that module over.
@samwright samwright requested a review from a team September 21, 2023 09:19
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 21, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.javaagent.instrumentation.pekkoactor;
Copy link
Contributor

Choose a reason for hiding this comment

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

our current convention is to also add the version number to package name io.opentelemetry.javaagent.instrumentation.pekkoactor.v1_0

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've now done that for pekkoactor and pekkohttp, for both the src/main and src/test packages.


@Override
public void transform(TypeTransformer transformer) {
// This is mainly for compatibility with 10.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this isn't needed for pekko as it is was for an older akka http version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking at Pekko, it seems only the singleRequest method exists. I'll remove the advice for singleRequestImpl instead, as it doesn't exist in HttpExt.

@samwright
Copy link
Contributor Author

I see the markdown-link-check is unhappy with a link unrelated to this PR. I think we need to fix this line to use something like this URL: https://projects.eclipse.org/projects/rt.jetty

Would you like me to include that in this PR? Or can we proceed without that check passing?

@laurit
Copy link
Contributor

laurit commented Sep 27, 2023

I see the markdown-link-check is unhappy with a link unrelated to this PR. I think we need to fix this line to use something like this URL: https://projects.eclipse.org/projects/rt.jetty

Would you like me to include that in this PR? Or can we proceed without that check passing?

A separate PR would be preferable. Often such issues resolve on their own, but we are not going to wait too long for it.

@laurit
Copy link
Contributor

laurit commented Sep 27, 2023

@samwright link check seems to pass again

@trask trask merged commit a8cb7a1 into open-telemetry:main Sep 29, 2023
@NissesSenap NissesSenap deleted the pekko branch October 2, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants