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

feat(auth): Add version info for analytics #758

Merged
merged 4 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add version to challenge response
  • Loading branch information
RaduW committed Sep 9, 2020
commit 8e6cd407257cd32e760f2a698939e96945f0d09f
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- Add the client SDK to session kafka payloads. ([#751](https://github.com/getsentry/relay/pull/751))
- Add a standalone tool to document metrics in JSON or YAML. ([#752](https://github.com/getsentry/relay/pull/752))
- Emit `processing.event.produced` for user report and session Kafka messages. ([#757](https://github.com/getsentry/relay/pull/757))
- Add Relay version version to challenge response. ([#758](https://github.com/getsentry/relay/pull/758))

## 20.8.0

Expand Down
4 changes: 4 additions & 0 deletions py/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Add Relay version version to challenge response. ([#758](https://github.com/getsentry/relay/pull/758))

## 0.6.1

- Removed deprecated `pii_selectors_from_event`.
Expand Down
4 changes: 2 additions & 2 deletions relay-auth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,8 @@ impl RegisterResponse {
self.token.as_str()
}

pub fn version(&self) -> String {
self.version.to_string()
pub fn version(&self) -> RelayVersion {
self.version
}
}

Expand Down
6 changes: 2 additions & 4 deletions relay-cabi/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ struct RelayRegisterResponse<'a> {
pub relay_id: RelayId,
pub token: &'a str,
pub public_key: &'a PublicKey,
pub version: &'a str,
pub version: RelayVersion,
}

ffi_fn! {
Expand All @@ -182,13 +182,11 @@ ffi_fn! {
max_age,
)?;

let version = response.version();

let relay_response = RelayRegisterResponse {
relay_id: response.relay_id(),
token: response.token(),
public_key: state.public_key(),
version: version.as_str(),
version: response.version(),
};

Ok(RelayStr::from_string(serde_json::to_string(&relay_response)?))
Expand Down