Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
523428bf
Commit
523428bf
authored
Dec 02, 2019
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Snowplow tracking timestamp expects use msecs
parent
14a16e2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/tracking.rb
lib/gitlab/tracking.rb
+2
-2
spec/lib/gitlab/tracking_spec.rb
spec/lib/gitlab/tracking_spec.rb
+2
-2
No files found.
lib/gitlab/tracking.rb
View file @
523428bf
...
...
@@ -29,14 +29,14 @@ module Gitlab
def
event
(
category
,
action
,
label:
nil
,
property:
nil
,
value:
nil
,
context:
nil
)
return
unless
enabled?
snowplow
.
track_struct_event
(
category
,
action
,
label
,
property
,
value
,
context
,
Time
.
now
.
to_i
)
snowplow
.
track_struct_event
(
category
,
action
,
label
,
property
,
value
,
context
,
(
Time
.
now
.
to_f
*
1000
)
.
to_i
)
end
def
self_describing_event
(
schema_url
,
event_data_json
,
context:
nil
)
return
unless
enabled?
event_json
=
SnowplowTracker
::
SelfDescribingJson
.
new
(
schema_url
,
event_data_json
)
snowplow
.
track_self_describing_event
(
event_json
,
context
,
Time
.
now
.
to_i
)
snowplow
.
track_self_describing_event
(
event_json
,
context
,
(
Time
.
now
.
to_f
*
1000
)
.
to_i
)
end
def
snowplow_options
(
group
)
...
...
spec/lib/gitlab/tracking_spec.rb
View file @
523428bf
...
...
@@ -97,7 +97,7 @@ describe Gitlab::Tracking do
'_property_'
,
'_value_'
,
nil
,
timestamp
.
to_i
(
timestamp
.
to_f
*
1000
)
.
to_i
)
track_event
...
...
@@ -130,7 +130,7 @@ describe Gitlab::Tracking do
expect
(
tracker
).
to
receive
(
:track_self_describing_event
).
with
(
'_event_json_'
,
nil
,
timestamp
.
to_i
(
timestamp
.
to_f
*
1000
)
.
to_i
)
track_event
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment