You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by Jie crossover <cr...@gmail.com> on 2024/06/19 08:12:33 UTC

[DISCUSS] PIP-363: Add callback parameters to the method: org.apache.pulsar.client.impl.SendCallback.sendComplete.

Hi, Pulsar Community.

I have created a PIP  to add an `OpSendMsgStats` parameter to the
`SendCallback` interface.
This will help us implement `messaging.publish.messages` metric.
PIP link: https://github.com/apache/pulsar/pull/22940
OpenTelemetry Messaging Metrics link:
https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/#metric-messagingpublishduration
-- 
Best Regards!
crossoverJie

Re: [DISCUSS] PIP-363: Add callback parameters to the method: org.apache.pulsar.client.impl.SendCallback.sendComplete.

Posted by Jie crossover <cr...@gmail.com>.
Hi Jiuming,

Thank you for fixing this.
-- 
Best Regards!
crossoverJie


太上玄元道君 <da...@apache.org> 于2024年6月21日周五 17:55写道:

> Hi Jie,
>
> Thanks, so we don't need to fix Skywalking, for OpenTelemetry-javaagent,
> I'll create a PR to fix this.
>
> Jie crossover <cr...@gmail.com> 于2024年6月21日周五 17:52写道:
>
> > Hi Jiuming,
> >
> > Good suggestion, done.
> > --
> > Best Regards!
> > crossoverJie
> >
> >
> > 太上玄元道君 <da...@apache.org> 于2024年6月21日周五 17:34写道:
> >
> > > Hi Jie,
> > >
> > > I suggest you don't modify the parameters order.
> > >
> > > Change
> > > ```
> > > void sendComplete(OpSendMsgStats stats, Exception e);
> > > ```
> > > to
> > > ```
> > > void sendComplete(Exception e, OpSendMsgStats stats);
> > > ```
> > >
> > > Thanks,
> > > Tao Jiuming
> > >
> > > Jie crossover <cr...@gmail.com> 于2024年6月21日周五 14:05写道:
> > >
> > > > Hi Jiuming,
> > > > You are right, because the data sent in batches cannot be obtained in
> > the
> > > > current pulsar-client, so when this feature is released, we need to
> add
> > > an
> > > > agent based on the latest version in OTel and Skywalking.
> > > >
> > > > --
> > > > Best Regards!
> > > > crossoverJie
> > > >
> > > >
> > > > 太上玄元道君 <da...@apache.org> 于2024年6月21日周五 13:30写道:
> > > >
> > > > > Hi Jie,
> > > > >
> > > > > I support the PIP but there are something we need to consider:
> > > > > OpenTelemetry-javagent[1] and Apache Skywalking-javaagent[2]
> enhanced
> > > > > `SendCallback` to monitor sending messages, if we change the method
> > > sign,
> > > > > the java-agents can't work.
> > > > > It will be great that you can make it compatible, or, we have to
> push
> > > PRs
> > > > > to OpenTelemetry/Skywalking to fix it.
> > > > >
> > > > > Links:
> > > > > [1]
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/pulsar/pulsar-2.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/ProducerImplInstrumentation.java
> > > > > [2]
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/dao-jun/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/pulsar-common/src/main/java/org/apache/skywalking/apm/plugin/pulsar/common/SendCallbackInterceptor.java
> > > > >
> > > > > Thanks,
> > > > > Tao Jiuming
> > > > >
> > > > > Zixuan Liu <no...@gmail.com> 于2024年6月21日周五 12:25写道:
> > > > >
> > > > > > +1
> > > > > >
> > > > > > Jie crossover <cr...@gmail.com> 于2024年6月19日周三 16:12写道:
> > > > > >
> > > > > > > Hi, Pulsar Community.
> > > > > > >
> > > > > > > I have created a PIP  to add an `OpSendMsgStats` parameter to
> the
> > > > > > > `SendCallback` interface.
> > > > > > > This will help us implement `messaging.publish.messages`
> metric.
> > > > > > > PIP link: https://github.com/apache/pulsar/pull/22940
> > > > > > > OpenTelemetry Messaging Metrics link:
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/#metric-messagingpublishduration
> > > > > > > --
> > > > > > > Best Regards!
> > > > > > > crossoverJie
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: [DISCUSS] PIP-363: Add callback parameters to the method: org.apache.pulsar.client.impl.SendCallback.sendComplete.

Posted by 太上玄元道君 <da...@apache.org>.
Hi Jie,

Thanks, so we don't need to fix Skywalking, for OpenTelemetry-javaagent,
I'll create a PR to fix this.

Jie crossover <cr...@gmail.com> 于2024年6月21日周五 17:52写道:

> Hi Jiuming,
>
> Good suggestion, done.
> --
> Best Regards!
> crossoverJie
>
>
> 太上玄元道君 <da...@apache.org> 于2024年6月21日周五 17:34写道:
>
> > Hi Jie,
> >
> > I suggest you don't modify the parameters order.
> >
> > Change
> > ```
> > void sendComplete(OpSendMsgStats stats, Exception e);
> > ```
> > to
> > ```
> > void sendComplete(Exception e, OpSendMsgStats stats);
> > ```
> >
> > Thanks,
> > Tao Jiuming
> >
> > Jie crossover <cr...@gmail.com> 于2024年6月21日周五 14:05写道:
> >
> > > Hi Jiuming,
> > > You are right, because the data sent in batches cannot be obtained in
> the
> > > current pulsar-client, so when this feature is released, we need to add
> > an
> > > agent based on the latest version in OTel and Skywalking.
> > >
> > > --
> > > Best Regards!
> > > crossoverJie
> > >
> > >
> > > 太上玄元道君 <da...@apache.org> 于2024年6月21日周五 13:30写道:
> > >
> > > > Hi Jie,
> > > >
> > > > I support the PIP but there are something we need to consider:
> > > > OpenTelemetry-javagent[1] and Apache Skywalking-javaagent[2] enhanced
> > > > `SendCallback` to monitor sending messages, if we change the method
> > sign,
> > > > the java-agents can't work.
> > > > It will be great that you can make it compatible, or, we have to push
> > PRs
> > > > to OpenTelemetry/Skywalking to fix it.
> > > >
> > > > Links:
> > > > [1]
> > > >
> > > >
> > >
> >
> https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/pulsar/pulsar-2.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/ProducerImplInstrumentation.java
> > > > [2]
> > > >
> > > >
> > >
> >
> https://github.com/dao-jun/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/pulsar-common/src/main/java/org/apache/skywalking/apm/plugin/pulsar/common/SendCallbackInterceptor.java
> > > >
> > > > Thanks,
> > > > Tao Jiuming
> > > >
> > > > Zixuan Liu <no...@gmail.com> 于2024年6月21日周五 12:25写道:
> > > >
> > > > > +1
> > > > >
> > > > > Jie crossover <cr...@gmail.com> 于2024年6月19日周三 16:12写道:
> > > > >
> > > > > > Hi, Pulsar Community.
> > > > > >
> > > > > > I have created a PIP  to add an `OpSendMsgStats` parameter to the
> > > > > > `SendCallback` interface.
> > > > > > This will help us implement `messaging.publish.messages` metric.
> > > > > > PIP link: https://github.com/apache/pulsar/pull/22940
> > > > > > OpenTelemetry Messaging Metrics link:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/#metric-messagingpublishduration
> > > > > > --
> > > > > > Best Regards!
> > > > > > crossoverJie
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: [DISCUSS] PIP-363: Add callback parameters to the method: org.apache.pulsar.client.impl.SendCallback.sendComplete.

Posted by Jie crossover <cr...@gmail.com>.
Hi Jiuming,

Good suggestion, done.
-- 
Best Regards!
crossoverJie


太上玄元道君 <da...@apache.org> 于2024年6月21日周五 17:34写道:

> Hi Jie,
>
> I suggest you don't modify the parameters order.
>
> Change
> ```
> void sendComplete(OpSendMsgStats stats, Exception e);
> ```
> to
> ```
> void sendComplete(Exception e, OpSendMsgStats stats);
> ```
>
> Thanks,
> Tao Jiuming
>
> Jie crossover <cr...@gmail.com> 于2024年6月21日周五 14:05写道:
>
> > Hi Jiuming,
> > You are right, because the data sent in batches cannot be obtained in the
> > current pulsar-client, so when this feature is released, we need to add
> an
> > agent based on the latest version in OTel and Skywalking.
> >
> > --
> > Best Regards!
> > crossoverJie
> >
> >
> > 太上玄元道君 <da...@apache.org> 于2024年6月21日周五 13:30写道:
> >
> > > Hi Jie,
> > >
> > > I support the PIP but there are something we need to consider:
> > > OpenTelemetry-javagent[1] and Apache Skywalking-javaagent[2] enhanced
> > > `SendCallback` to monitor sending messages, if we change the method
> sign,
> > > the java-agents can't work.
> > > It will be great that you can make it compatible, or, we have to push
> PRs
> > > to OpenTelemetry/Skywalking to fix it.
> > >
> > > Links:
> > > [1]
> > >
> > >
> >
> https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/pulsar/pulsar-2.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/ProducerImplInstrumentation.java
> > > [2]
> > >
> > >
> >
> https://github.com/dao-jun/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/pulsar-common/src/main/java/org/apache/skywalking/apm/plugin/pulsar/common/SendCallbackInterceptor.java
> > >
> > > Thanks,
> > > Tao Jiuming
> > >
> > > Zixuan Liu <no...@gmail.com> 于2024年6月21日周五 12:25写道:
> > >
> > > > +1
> > > >
> > > > Jie crossover <cr...@gmail.com> 于2024年6月19日周三 16:12写道:
> > > >
> > > > > Hi, Pulsar Community.
> > > > >
> > > > > I have created a PIP  to add an `OpSendMsgStats` parameter to the
> > > > > `SendCallback` interface.
> > > > > This will help us implement `messaging.publish.messages` metric.
> > > > > PIP link: https://github.com/apache/pulsar/pull/22940
> > > > > OpenTelemetry Messaging Metrics link:
> > > > >
> > > > >
> > > >
> > >
> >
> https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/#metric-messagingpublishduration
> > > > > --
> > > > > Best Regards!
> > > > > crossoverJie
> > > > >
> > > >
> > >
> >
>

Re: [DISCUSS] PIP-363: Add callback parameters to the method: org.apache.pulsar.client.impl.SendCallback.sendComplete.

Posted by 太上玄元道君 <da...@apache.org>.
Hi Jie,

I suggest you don't modify the parameters order.

Change
```
void sendComplete(OpSendMsgStats stats, Exception e);
```
to
```
void sendComplete(Exception e, OpSendMsgStats stats);
```

Thanks,
Tao Jiuming

Jie crossover <cr...@gmail.com> 于2024年6月21日周五 14:05写道:

> Hi Jiuming,
> You are right, because the data sent in batches cannot be obtained in the
> current pulsar-client, so when this feature is released, we need to add an
> agent based on the latest version in OTel and Skywalking.
>
> --
> Best Regards!
> crossoverJie
>
>
> 太上玄元道君 <da...@apache.org> 于2024年6月21日周五 13:30写道:
>
> > Hi Jie,
> >
> > I support the PIP but there are something we need to consider:
> > OpenTelemetry-javagent[1] and Apache Skywalking-javaagent[2] enhanced
> > `SendCallback` to monitor sending messages, if we change the method sign,
> > the java-agents can't work.
> > It will be great that you can make it compatible, or, we have to push PRs
> > to OpenTelemetry/Skywalking to fix it.
> >
> > Links:
> > [1]
> >
> >
> https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/pulsar/pulsar-2.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/ProducerImplInstrumentation.java
> > [2]
> >
> >
> https://github.com/dao-jun/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/pulsar-common/src/main/java/org/apache/skywalking/apm/plugin/pulsar/common/SendCallbackInterceptor.java
> >
> > Thanks,
> > Tao Jiuming
> >
> > Zixuan Liu <no...@gmail.com> 于2024年6月21日周五 12:25写道:
> >
> > > +1
> > >
> > > Jie crossover <cr...@gmail.com> 于2024年6月19日周三 16:12写道:
> > >
> > > > Hi, Pulsar Community.
> > > >
> > > > I have created a PIP  to add an `OpSendMsgStats` parameter to the
> > > > `SendCallback` interface.
> > > > This will help us implement `messaging.publish.messages` metric.
> > > > PIP link: https://github.com/apache/pulsar/pull/22940
> > > > OpenTelemetry Messaging Metrics link:
> > > >
> > > >
> > >
> >
> https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/#metric-messagingpublishduration
> > > > --
> > > > Best Regards!
> > > > crossoverJie
> > > >
> > >
> >
>

Re: [DISCUSS] PIP-363: Add callback parameters to the method: org.apache.pulsar.client.impl.SendCallback.sendComplete.

Posted by Jie crossover <cr...@gmail.com>.
Hi Jiuming,
You are right, because the data sent in batches cannot be obtained in the
current pulsar-client, so when this feature is released, we need to add an
agent based on the latest version in OTel and Skywalking.

-- 
Best Regards!
crossoverJie


太上玄元道君 <da...@apache.org> 于2024年6月21日周五 13:30写道:

> Hi Jie,
>
> I support the PIP but there are something we need to consider:
> OpenTelemetry-javagent[1] and Apache Skywalking-javaagent[2] enhanced
> `SendCallback` to monitor sending messages, if we change the method sign,
> the java-agents can't work.
> It will be great that you can make it compatible, or, we have to push PRs
> to OpenTelemetry/Skywalking to fix it.
>
> Links:
> [1]
>
> https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/pulsar/pulsar-2.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/ProducerImplInstrumentation.java
> [2]
>
> https://github.com/dao-jun/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/pulsar-common/src/main/java/org/apache/skywalking/apm/plugin/pulsar/common/SendCallbackInterceptor.java
>
> Thanks,
> Tao Jiuming
>
> Zixuan Liu <no...@gmail.com> 于2024年6月21日周五 12:25写道:
>
> > +1
> >
> > Jie crossover <cr...@gmail.com> 于2024年6月19日周三 16:12写道:
> >
> > > Hi, Pulsar Community.
> > >
> > > I have created a PIP  to add an `OpSendMsgStats` parameter to the
> > > `SendCallback` interface.
> > > This will help us implement `messaging.publish.messages` metric.
> > > PIP link: https://github.com/apache/pulsar/pull/22940
> > > OpenTelemetry Messaging Metrics link:
> > >
> > >
> >
> https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/#metric-messagingpublishduration
> > > --
> > > Best Regards!
> > > crossoverJie
> > >
> >
>

Re: [DISCUSS] PIP-363: Add callback parameters to the method: org.apache.pulsar.client.impl.SendCallback.sendComplete.

Posted by 太上玄元道君 <da...@apache.org>.
Hi Jie,

I support the PIP but there are something we need to consider:
OpenTelemetry-javagent[1] and Apache Skywalking-javaagent[2] enhanced
`SendCallback` to monitor sending messages, if we change the method sign,
the java-agents can't work.
It will be great that you can make it compatible, or, we have to push PRs
to OpenTelemetry/Skywalking to fix it.

Links:
[1]
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/pulsar/pulsar-2.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/ProducerImplInstrumentation.java
[2]
https://github.com/dao-jun/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/pulsar-common/src/main/java/org/apache/skywalking/apm/plugin/pulsar/common/SendCallbackInterceptor.java

Thanks,
Tao Jiuming

Zixuan Liu <no...@gmail.com> 于2024年6月21日周五 12:25写道:

> +1
>
> Jie crossover <cr...@gmail.com> 于2024年6月19日周三 16:12写道:
>
> > Hi, Pulsar Community.
> >
> > I have created a PIP  to add an `OpSendMsgStats` parameter to the
> > `SendCallback` interface.
> > This will help us implement `messaging.publish.messages` metric.
> > PIP link: https://github.com/apache/pulsar/pull/22940
> > OpenTelemetry Messaging Metrics link:
> >
> >
> https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/#metric-messagingpublishduration
> > --
> > Best Regards!
> > crossoverJie
> >
>

Re: [DISCUSS] PIP-363: Add callback parameters to the method: org.apache.pulsar.client.impl.SendCallback.sendComplete.

Posted by Zixuan Liu <no...@gmail.com>.
+1

Jie crossover <cr...@gmail.com> 于2024年6月19日周三 16:12写道:

> Hi, Pulsar Community.
>
> I have created a PIP  to add an `OpSendMsgStats` parameter to the
> `SendCallback` interface.
> This will help us implement `messaging.publish.messages` metric.
> PIP link: https://github.com/apache/pulsar/pull/22940
> OpenTelemetry Messaging Metrics link:
>
> https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/#metric-messagingpublishduration
> --
> Best Regards!
> crossoverJie
>