Skip to content

Commit

Permalink
fix javascript server template to include defined metrics in the para…
Browse files Browse the repository at this point in the history
…meter list for named event record calls (#643)
  • Loading branch information
dmueller authored Dec 18, 2023
1 parent 0de1ddb commit d02ae92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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

0 comments on commit d02ae92

Please sign in to comment.