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

Update qryn+gigapipe docs #1594

Merged
merged 14 commits into from
Oct 17, 2024
Merged

Update qryn+gigapipe docs #1594

merged 14 commits into from
Oct 17, 2024

Conversation

lmangani
Copy link
Contributor

@lmangani lmangani commented Oct 16, 2024

Updates for the qryn opensource and qryn/gigapipe integrations

@lmangani lmangani marked this pull request as draft October 16, 2024 18:51
@lmangani
Copy link
Contributor Author

@blumamir we should be nearly ready!
Could you help us review the changes and troubleshoot the source of the Docs test failures?

@lmangani
Copy link
Contributor Author

@blumamir the blocker seems to be related to secrets. Could you review our changes and suggest what's wrong?

Copy link
Collaborator

@blumamir blumamir left a comment

Choose a reason for hiding this comment

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

Thanks @lmangani

This looks great, thank you for improving it so nicely and making sure everything works.

I've added few comments, most of them are nits or suggestions, so feel free to address what you like and ignore what you don't want to do.

destinations/data/qryn.yaml Show resolved Hide resolved
destinations/data/qrynoss.yaml Outdated Show resolved Hide resolved
destinations/data/qrynoss.yaml Outdated Show resolved Hide resolved
Comment on lines +10 to +11
- **API Username**: The HTTP Basic Auth username for your qryn instance
- **API Password**: The HTTP Basic Auth password for your qryn instance
Copy link
Collaborator

Choose a reason for hiding this comment

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

If I got it right, those are the value in the QRYN_LOGIN and QRYN_PASSWORD environment variables described in the docs?

WDYT about making it explicit, so users know where they can find the content of these values to populate here quickly.

- **Name**: Choose a name for this backend _(e.g. qryn)_
- **API Username**: The HTTP Basic Auth username for your qryn instance
- **API Password**: The HTTP Basic Auth password for your qryn instance
- **API URL**: The API Endpoint for for your qryn instance _(e.g. https://qryn.local:3100)_
Copy link
Collaborator

Choose a reason for hiding this comment

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

The example here shows https. I wonder is http supported as well? and if so, which one is more common?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With the OSS version http is the default indeed. we can set the example to plain http

Copy link
Collaborator

Choose a reason for hiding this comment

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

amazing thanks, I think it can avoid confusion for some users 🚀

Comment on lines +18 to +19
- **API Secret**: The API Secret for your Gigapipe Account
- **API Key**: The API Token for your Gigapipe Account
Copy link
Collaborator

@blumamir blumamir Oct 17, 2024

Choose a reason for hiding this comment

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

We experienced that users sometimes struggle to find out where in the managed backend ui console these values can be found.

If you find it helpful, you can browse other destinations and consider adding some instructions or screenshot on how to populate these values. for example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We included a Frame with a screenshot but we'll sure update it with a more specific one as we proceed.

return fmt.Sprintf("%s://%s:%s@%s", u.Scheme, apiKey, apiSecret, u.Host), nil
}

func (g *Qryn) maybeAddExporterName(conf *qrynConf, currentConfig *Config, processorName string, name string,
Copy link
Collaborator

@blumamir blumamir Oct 17, 2024

Choose a reason for hiding this comment

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

Can you elaborate on the usage for this exporter name?

I see it adds an attribute "qryn_exporter" to all telemetry signals with values odigos-qryn-logs, odigos-qryn-traces, odigos-qryn-metrics.

Is this added to trace in qryn where the data came from?

Is qryn_exporter a common attribute in qryn ecosystem?

@@ -101,5 +149,22 @@ func parseURL(rawURL, apiKey, apiSecret string) (string, error) {
return parseURL(fmt.Sprintf("https://%s", rawURL), apiKey, apiSecret)
}

return fmt.Sprintf("https://%s:%s@%s", apiKey, apiSecret, u.Host), nil
return fmt.Sprintf("%s://%s:%s@%s", u.Scheme, apiKey, apiSecret, u.Host), nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

important: if we encode the secret into the url this way, it will show up as plain text in the config map which can be undesirable for some users due to security concerns.

You can use the basicauthextension to implement this authentication, while keeping the password as env variable. see otlphttp for example code on how to use it

Copy link
Collaborator

Choose a reason for hiding this comment

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

Update: after the latest commit, the value is no longer plain text in the configmap which is great.

If you like, you can still consider using the basic auto extension, or resolve this thread.

@@ -101,5 +149,22 @@ func parseURL(rawURL, apiKey, apiSecret string) (string, error) {
return parseURL(fmt.Sprintf("https://%s", rawURL), apiKey, apiSecret)
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider trimming rawURL white spaces, as it will make url.Parse(rawURL) return with error.

	noWhiteSpaces := strings.TrimSpace(rawUrl)
	parsedUrl, err := url.Parse(noWhiteSpaces)

@@ -101,5 +149,22 @@ func parseURL(rawURL, apiKey, apiSecret string) (string, error) {
return parseURL(fmt.Sprintf("https://%s", rawURL), apiKey, apiSecret)
}

return fmt.Sprintf("https://%s:%s@%s", apiKey, apiSecret, u.Host), nil
return fmt.Sprintf("%s://%s:%s@%s", u.Scheme, apiKey, apiSecret, u.Host), nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we just take the u.Host, we will silently drop any u.Path that the user might have set. I guess in most cases this is fine, but in clusters with internal routing this might break the export.

I am also fine with keeping it as is if you prefer and address this issue if someone bumps into it.

An alternative can be to modify the u object itself, and then use u.String() to make it a safe url string in idomatic way

@akvlad
Copy link
Contributor

akvlad commented Oct 17, 2024

@lmangani @blumamir "secrets" issue seems done. Docs examples are updated as well. Please approve, let's see if all the CI tests are successful.

@blumamir
Copy link
Collaborator

@lmangani @blumamir "secrets" issue seems done. Docs examples are updated as well. Please approve, let's see if all the CI tests are successful.

Thanks qryn team, I just reviewed the previous version. taking a look at the new commit to update the review 🥇

@lmangani lmangani marked this pull request as ready for review October 17, 2024 10:51
Co-authored-by: Amir Blum <amirgiraffe@gmail.com>
Copy link
Collaborator

@blumamir blumamir left a comment

Choose a reason for hiding this comment

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

Thanks again qryn team, you are awesome.

Added few more minor comments, but they are all optional.
Feel free to adddress what makes sense to you and resolve the rest and then we can merge.

common/config/qryn.go Outdated Show resolved Hide resolved
displayName: Basic auth password
componentType: input
componentProps:
type: password
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can consider adding:

tooltip: 'some short text describing this option'

It will then show up in the UI as a question mark popup next to the option, giving more context on how to fecth it or what it does.

destinations/data/qrynoss.yaml Outdated Show resolved Hide resolved
- **Name**: Choose a name for this backend _(e.g. qryn)_
- **API Username**: The HTTP Basic Auth username for your qryn instance
- **API Password**: The HTTP Basic Auth password for your qryn instance
- **API URL**: The API Endpoint for for your qryn instance _(e.g. https://qryn.local:3100)_
Copy link
Collaborator

Choose a reason for hiding this comment

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

amazing thanks, I think it can avoid confusion for some users 🚀

common/config/qryn.go Show resolved Hide resolved
@@ -101,5 +149,22 @@ func parseURL(rawURL, apiKey, apiSecret string) (string, error) {
return parseURL(fmt.Sprintf("https://%s", rawURL), apiKey, apiSecret)
}

return fmt.Sprintf("https://%s:%s@%s", apiKey, apiSecret, u.Host), nil
return fmt.Sprintf("%s://%s:%s@%s", u.Scheme, apiKey, apiSecret, u.Host), nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update: after the latest commit, the value is no longer plain text in the configmap which is great.

If you like, you can still consider using the basic auto extension, or resolve this thread.

@akvlad
Copy link
Contributor

akvlad commented Oct 17, 2024

@lmangani @blumamir Sorry guys. I have renamed the yamls as well as you did. Now they can fit the docs. Fixed the "urlparse" issue as well

@lmangani
Copy link
Contributor Author

@blumamir I think we're ready! Please ping us on the side to provide you some testing tokens for validation 😉

@blumamir blumamir merged commit 41db3fd into odigos-io:main Oct 17, 2024
26 checks passed
@blumamir
Copy link
Collaborator

Thanks, merged the PR.
Will test the integration soon

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