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

Support for Gravitee.io API Gateway #83

Open
brasseld opened this issue Feb 14, 2022 · 5 comments
Open

Support for Gravitee.io API Gateway #83

brasseld opened this issue Feb 14, 2022 · 5 comments

Comments

@brasseld
Copy link

Hi there,

I'm looking for contributing to provide integration between Gravitee.io API Gateway and API Clarity as a POC.

Do you have any pointer for me to start with? I had a quick look to the plugins you are providing for Kong and Tyk, but I didn't find any relevant information (API ?) where to push instrumentation metrics.

Thanks in advance.

@FrimIdan
Copy link
Member

Hi @brasseld thanks for reaching out and happy to hear that you want to add Gravitee.io as a new traffic source.

We definitely need to add a new doc describing how people can add more traffic sources, for now I can point you to the plugins API (go client code is already generated here).
For an example how/what info is expected you can look at the current plugins implementations (tapper, kong).

There is also a section in the helm values to enable each traffic source with a specific values for each one.

@brasseld
Copy link
Author

Thanks for your feedback @FrimIdan

It's probably me doing something wrong (or maybe I missed something) but when I try to Postman for creating (post) a new telemetry, I'm always getting a 400 response:

{
    "code": 400,
    "message": "parsing body body from \"\" failed, because illegal base64 data at input byte 3"
}

What I'm trying to POST to /api/telemetry:

{
    "requestID": "123456789",
    "scheme": "HTTP",
    "destinationAddress": "localhost:8082",
    "destinationNamespace": "default",
    "sourceAddress": "localhost:8082",
    "request": {
        "method": "GET",
        "path": "/api",
        "host": "localhost",
        "common": {
            "version": "1",
            "headers": [
                {
                    "key": "Content-Type",
                    "value": "application/json"
                }
            ],
            "body": "sit sint",
            "TruncatedBody": true,
            "time": "1988-12-08T22:59:33.988Z"
        }
    },
    "response": {
        "statusCode": "200",
        "common": {
            "version": "1",
            "headers": [
                {
                    "key": "cupidatat s",
                    "value": "irure sint in est"
                },
                {
                    "key": "aliqua in Lorem qui dolor",
                    "value": "aute labore"
                }
            ],
            "body": "aliquip irure enim",
            "TruncatedBody": true,
            "time": "1992-07-24T18:11:57.341Z"
        }
    }
}

(This has been mainly generated by Postman by importing the swagger you provided me).

Thanks for your feedback.

@brasseld
Copy link
Author

Ok, seems that the error message is quite clear body.body has to be base64 encoded (would be great to update the swagger to add a description about it :) )

Now fighting with a 500 status code from clarity...

@brasseld
Copy link
Author

Got it from logs, only base64 of json payload is supported :)

@FrimIdan
Copy link
Member

Ok, seems that the error message is quite clear body.body has to be base64 encoded (would be great to update the swagger to add a description about it :) )

format: 'byte' is not clear enough I agree - we didn't though about it since the generated client is handling that.
Fill free to open a PR to add descriptions where you think it will be helpful for others.

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

No branches or pull requests

2 participants