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

fix javascript server template to include defined metrics in the parameter list for named event record calls #643

Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Fix javascript_server template to include non-event metric parameters in #record call for event metrics ([#643](https://github.com/mozilla/glean_parser/pull/643))

## 11.0.0

- Add updated logging logic for Ruby Server ([#642](https://github.com/mozilla/glean_parser/pull/642))
Expand Down
8 changes: 7 additions & 1 deletion glean_parser/templates/javascript_server.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,13 @@ class {{ ping|event_class_name(event_metric_exists) }} {
this.#record({
user_agent,
ip_address,
identifiers_fxa_account_id,
{% for metric_type, metrics in metrics_by_type.items() %}
{% if metric_type != 'event' %}
{% for metric in metrics %}
{{ metric|metric_argument_name }},
{% endfor %}
{% endif %}
{% endfor %}
event
});
}
Expand Down