On Wed, Aug 8, 2018 at 7:58 PM, Rajith Roshan <raji...@wso2.com> wrote:

>
>
> On Wed, Aug 8, 2018 at 7:33 PM Nuwan Dias <nuw...@wso2.com> wrote:
>
>> How about introducing it as an annotation (custom of course) to the
>> Ballerina code itself?
>>
> This seems to be the most easiest way, But one micro gw can have multiple
> apis  , then annotation have to be copied for each api.
> Other way is to add it to micro-gw conf (toml) while copying it to the
> distribution when building the distribution.
>
>>
>> On Wed, Aug 8, 2018 at 5:46 PM Fazlan Nazeem <fazl...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> Is there a way to extract the microgateway label from the runtime? This
>>> is because we need to publish this information to the Stream Processor for
>>> analytics. Although we do not have any charts which filter statistics
>>> depending on the label, this may come up as a requirement in the future.
>>> Additionally, there should be some mechanism to know what label is
>>> associated with each microgateway. Once the micro-gateway is generated,
>>> this information doesn't seem to be retrievable.
>>>
>> And also micro gateway can be built without  label also. It can fetch an
> api from name and version, so there won't be label at that time.  Then we
> have only the project name. Can't we use project name for this.
>

Yes we need to think about both situations; micro-gw for a label and single
API.

I think we are basically trying to identify which microgateway the event is
coming from.
If we take the label approach, let's say if we generate two microgw
distributions
using the label "accounts" and then make them work together using a LB,
both of them will be having a same identifier "accounts". We will not be
able to see how many requests each "accounts" microgws got individually.

So I also think a mechanism using project name or any other way of setting
a unique ID for each gateway would be better. And we need to have a
seperate mechanism to identify which microgw with ID has which label (or
the API).


>
>>> Currently, the value for the label field is predefined in the source
>>> code. According to an offline chat with Malintha, we may have to burn the
>>> label into the microgw-conf file during gateway building phase or persist
>>> this info in some other means. Any suggestions?
>>>
>>
>
>>> --
>>> Thanks & Regards,
>>>
>>> *Fazlan Nazeem*
>>> Senior Software Engineer
>>> WSO2 Inc
>>> Mobile : +94772338839
>>> fazl...@wso2.com
>>>
>>
>>
>> --
>> Nuwan Dias
>>
>> Director - WSO2, Inc. http://wso2.com
>> email : nuw...@wso2.com
>> Phone : +94 777 775 729
>>
>
>
> --
> Rajith Roshan
> Senior Software Engineer, WSO2 Inc.
> Mobile: +94-717-064-214
>



-- 
Malintha Amarasinghe
*WSO2, Inc. - lean | enterprise | middleware*
http://wso2.com/

Mobile : +94 712383306
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to