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

2024-06-21 Thread 太上玄元道君
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  于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
>
>
> 太上玄元道君  于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  于2024年6月21日周五 12:25写道:
> >
> > > +1
> > >
> > > Jie crossover  于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.

2024-06-21 Thread Jie crossover
Hi Jiuming,

Good suggestion, done.
-- 
Best Regards!
crossoverJie


太上玄元道君  于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  于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
> >
> >
> > 太上玄元道君  于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  于2024年6月21日周五 12:25写道:
> > >
> > > > +1
> > > >
> > > > Jie crossover  于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.

2024-06-21 Thread 太上玄元道君
Hi Jie,

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

Jie crossover  于2024年6月21日周五 17:52写道:

> Hi Jiuming,
>
> Good suggestion, done.
> --
> Best Regards!
> crossoverJie
>
>
> 太上玄元道君  于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  于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
> > >
> > >
> > > 太上玄元道君  于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  于2024年6月21日周五 12:25写道:
> > > >
> > > > > +1
> > > > >
> > > > > Jie crossover  于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.

2024-06-21 Thread Jie crossover
Hi Jiuming,

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


太上玄元道君  于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  于2024年6月21日周五 17:52写道:
>
> > Hi Jiuming,
> >
> > Good suggestion, done.
> > --
> > Best Regards!
> > crossoverJie
> >
> >
> > 太上玄元道君  于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  于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
> > > >
> > > >
> > > > 太上玄元道君  于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  于2024年6月21日周五 12:25写道:
> > > > >
> > > > > > +1
> > > > > >
> > > > > > Jie crossover  于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-361: Support URI, DNS, RID, IP based Token building from client's X.509 Certificate SAN Extensions

2024-06-21 Thread naresh
Hi Liu,

Only 2 new properties are added. I have already implemented code extending
AuthenticationProviderTls

I have gone through older tickets which asked for this feature
https://github.com/apache/pulsar/issues/4696

Environments like SPIFFE would get out-of-the-box support from pulsar with
this PIP as well as above ticket.

Are you suggesting the pulsar community wont benefit from this and host it
in other git repo as separate plugin ?

Thanks
Naresh
On Thu, 20 Jun 2024 at 7:54 PM, Zixuan Liu  wrote:

> Hi naresh,
>
> Right now the Pulsar can only get the role from a common name, your PIP is
> an awesome idea that supports URI, DNS, RID, IP based Token as role, and is
> very helpful for large organizations.
>
> In this PIP, you will introduce many configurations of identity mechanisms,
> which are complex if users are not clear about their application scenarios.
>
> I voted 0 for this PIP, and I suggest you implement your authentication
> provider by https://pulsar.apache.org/docs/next/security-extending.
>
> Thanks,
> Zixuan
>
> naresh  于2024年6月15日周六 16:24写道:
>
> > Hello,
> >
> > This is my PIP Request at https://github.com/apache/pulsar/pull/22917
> >
> > If this PIP is acceptable, i am considering the following for the code
> > changes:
> >
> >1. Enhance the existing
> >org.apache.pulsar.broker.authentication.AuthenticationProviderTls
> class
> > to
> >support these changes
> >2. Create a new class
> >org.apache.pulsar.broker.authentication.AuthenticationProviderTlsSan
> > thats
> >backward compatible with current implementation
> >
> > Currently, I have made code changes on my local to support option-2.
> Before
> > I go far, requesting some feedback on the overall proposal.
> >
> > Thanks
> > Naresh
> >
>