Skip to content

Commit

Permalink
update otel api library
Browse files Browse the repository at this point in the history
  • Loading branch information
tsloughter committed Nov 13, 2024
1 parent 6333127 commit e819458
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{deps, [{backoff, "~> 1.1.6"},
{pg_types, "~> 0.4.0"},
{opentelemetry_api, "~> 1.3.1"}]}.
{opentelemetry_api, "~> 1.4.0"}]}.

{profiles, [{test, [{erl_opts, [nowarn_export_all]},
{deps, [jsone,
Expand Down
14 changes: 3 additions & 11 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
{"1.2.0",
[{<<"backoff">>,{pkg,<<"backoff">>,<<"1.1.6">>},0},
{<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.3.1">>},0},
{<<"opentelemetry_semantic_conventions">>,
{pkg,<<"opentelemetry_semantic_conventions">>,<<"0.2.0">>},
1},
{<<"pg_types">>,{pkg,<<"pg_types">>,<<"0.4.0">>},0}]}.
{<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.4.0">>},0}]}.
[
{pkg_hash,[
{<<"backoff">>, <<"83B72ED2108BA1EE8F7D1C22E0B4A00CFE3593A67DBC792799E8CCE9F42F796B">>},
{<<"opentelemetry_api">>, <<"83B4713593F80562D9643C4AB0B6F80F3C5FA4C6D0632C43E11B2CCB6B04DFA7">>},
{<<"opentelemetry_semantic_conventions">>, <<"B67FE459C2938FCAB341CB0951C44860C62347C005ACE1B50F8402576F241435">>},
{<<"pg_types">>, <<"3CE365C92903C5BB59C0D56382D842C8C610C1B6F165E20C4B652C96FA7E9C14">>}]},
{<<"opentelemetry_api">>, <<"63CA1742F92F00059298F478048DFB826F4B20D49534493D6919A0DB39B6DB04">>}]},
{pkg_hash_ext,[
{<<"backoff">>, <<"CF0CFFF8995FB20562F822E5CC47D8CCF664C5ECDC26A684CBE85C225F9D7C39">>},
{<<"opentelemetry_api">>, <<"9E8A5CC38671E3AC61BE48ABE5F6B3AFDBBB50A1DC08B7950C56F169611505C1">>},
{<<"opentelemetry_semantic_conventions">>, <<"D61FA1F5639EE8668D74B527E6806E0503EFC55A42DB7B5F39939D84C07D6895">>},
{<<"pg_types">>, <<"B02EFA785CAECECF9702C681C80A9CA12A39F9161A846CE17B01FB20AEEED7EB">>}]}
{<<"opentelemetry_api">>, <<"3DFBBFAA2C2ED3121C5C483162836C4F9027DEF469C41578AF5EF32589FCFC58">>}]}
].
2 changes: 1 addition & 1 deletion src/pgo_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ setup_finish(Conn=#conn{socket_module=SocketModule,
%% set_succeeded_or_within_failed_transaction({error, {error, _} = Error}) ->
%% error:is_in_failed_sql_transaction(Error).

-spec extended_query(#conn{}, iodata(), list(), pgo:decode_aopts(), any(), list()) -> pgo:result().
-spec extended_query(#conn{}, iodata(), list(), pgo:decode_opts(), any(), list()) -> pgo:result().
extended_query(Conn=#conn{socket=Socket,
socket_module=SocketModule,
pool=Pool}, Query, Parameters, DecodeOptions, PerRowFun, Acc0) ->
Expand Down
8 changes: 6 additions & 2 deletions test/pgo_datetime_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,19 @@ select(_Config) ->

insert(_Config) ->
?assertMatch(#{command := create},
pgo:query("create temporary table times (a_timestamp timestamp, a_time time)")),
pgo:query("create temporary table times (user_id integer, a_timestamp timestamp, a_time time)")),

?assertMatch(#{command := insert},
pgo:query("insert into times (a_timestamp, a_time) VALUES ($1, $2)",
[{{2012,1,17},{10,54,3.45}}, {10,54,3.45}])),

?assertMatch(#{command := select,
rows := [{{{2012,1,17},{10,54,3.45}}, {10,54,3.45}}]},
pgo:query("select a_timestamp, a_time from times")).
pgo:query("select a_timestamp, a_time from times")),

?assertMatch(#{command := insert},

Check failure on line 104 in test/pgo_datetime_SUITE.erl

View workflow job for this annotation

GitHub Actions / JUnit Test Report

/home/runner/work/pgo/pgo/test/pgo_datetime_SUITE.erl.insert

Test insert in pgo_datetime_SUITE failed!
Raw output
{{assertMatch,
     [{module,pgo_datetime_SUITE},
      {line,104},
      {expression,
          "pgo : query ( \"insert into times (user_id, a_timestamp, a_time) VALUES ($1, $2, $3)\" , [ { { 2012 , 1 , 17 } , { 10 , 54 , 3.45 } } , { { 2012 , 1 , 17 } , { 10 , 54 , 3.45 } } , { 10 , 54 , 3.45 } ] )"},
      {pattern,"# { command := insert }"},
      {value,
          {error,
              #{error => badarg_encoding,module => pg_types,
                type_info =>
                    {type_info,23,pg_int4,[],default,<<"int4">>,
                        <<"int4send">>,<<"int4recv">>,4,<<"int4out">>,
                        <<"int4in">>,0,undefined,0,[],undefined},
                value => {{2012,1,17},{10,54,3.45}}}}}]},
 [{pgo_datetime_SUITE,insert,1,
      [{file,"/home/runner/work/pgo/pgo/test/pgo_datetime_SUITE.erl"},
       {line,104}]},
  {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
  {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1291}]},
  {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1223}]}]}
pgo:query("insert into times (user_id, a_timestamp, a_time) VALUES ($1, $2, $3)",
[{{2012,1,17},{10,54,3.45}}, {{2012,1,17},{10,54,3.45}}, {10,54,3.45}])).

interval(_Config) ->
?assertMatch(#{command := create},
Expand Down

0 comments on commit e819458

Please sign in to comment.